Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> DBMS_RULE and using implicit variables - getting ORA-30625: method dispatch on NULL SELF argument is disallowed

DBMS_RULE and using implicit variables - getting ORA-30625: method dispatch on NULL SELF argument is disallowed

From: Andy Hardy <junkmail_at_[127.0.0.1>
Date: Sun, 24 Jul 2005 12:57:46 +0100
Message-ID: <i5ZQgAG6I44CFAFb@[127.0.0.1]>


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'

,condition => ':alert_set = ''T'' '
,action_context => l_ac
,rule_comment => 'Highlight ALERTS');

My rules.get_pair_value is specified as:

 FUNCTION get_pair_value(eco VARCHAR2

                         ,ecn   VARCHAR2
                         ,var   VARCHAR2
                         ,evctx sys.re$nv_list) RETURN
sys.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: 0xA62A4849
Received on Sun Jul 24 2005 - 06:57:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US