Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> DBMS_RULE and using implicit variables - getting ORA-30625: method dispatch on NULL SELF argument is disallowed
I've been looking at the DBMS_RULES demo from
http://www.oracle-doku.de/oracle_10g_documentation/server.101/b10727/rule
sdem.htm#1109503 .
The script seems to work fine! It is able to refer to a value added through the use of 'add_pair'.
However, when I try to encapsulate the script into a package ("rules") and I try to use a function within the package to provide the implicit variable I get the ORA-30625.
My evaluation context is created:
l_vt := sys.re$variable_type_list(
sys.re$variable_type('priority'
,'number'
,NULL
,NULL)
,sys.re$variable_type('alert_set'
,'varchar2(1)'
,'rules.get_pair_value'
,NULL));
dbms_rule_adm.create_evaluation_context(
evaluation_context_name => 'evalctx'
,variable_types => l_vt
,evaluation_context_comment => 'Job priority');
My new rule is:
l_ac := sys.re$nv_list(NULL);
l_ac.add_pair('COLOUR',sys.anydata.convertvarchar2('RED'));
dbms_rule_adm.create_rule(rule_name => 'r4',action_context => l_ac
,condition => ':alert_set = ''T'' '
My rules.get_pair_value is specified as:
FUNCTION get_pair_value(eco VARCHAR2
,ecn VARCHAR2 ,var VARCHAR2 ,evctx sys.re$nv_list) RETURNsys.re$variable_value
but if the function refers to evctx I get the ORA error.
In essence, I want one rule to set a value-pair and for another rule to use that value-pair i.e. the ability to read the working set.
Any ideas?
-- Andy Hardy. PGP ID: 0xA62A4849Received on Sun Jul 24 2005 - 06:57:46 CDT
![]() |
![]() |