[rules-users] Globals in LHS

Meeraj Kunnumpurath mkunnumpurath at googlemail.com
Fri Jul 16 07:34:16 EDT 2010


Hi,

Can I use globals in the LHS of a rule. The rule I have is as follows,

package mypackage;

import mypackage.Payment;

global java.util.Set accountNumbers;

rule "Check debtor account number exists"
when
    $p : Payment (accountNumber not memberOf $accountNumbers)
then
end

I insert an instance of HashSet using the setGlobal method on the
StatelessKnowledgeSession. However, when I execute the rule, I get the
following error.

[Error: unable to resolve method: mypackage.Payment.$accountNumbers()
[arglength=0]]

Kind regards
Meeraj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100716/aa90280c/attachment.html 


More information about the rules-users mailing list