As an aside, if you can change the rule definitions it'd be preferable to remove the eval:-<div><br></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div>
rule "EmailVerificationCheck"</div><div>salience 500</div><div>when</div><div> $c : RuleContext (paymentMethod == "P_EXPRESS", trustedUser==false)</div><div> $a : RuleAction (action == null || == "VERIFY")</div>
<div>then</div><div> ...</div><div>end</div></span><div><br></div>isTrustedUser() is a member of RuleContext and you can therefore access it's boolean properties like any other.</div><div><br></div><div>Also, you could split the RHS into different rules too:-</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>rule "EmailVerificationCheck #1"</div><div>salience 500</div><div>when</div>
<div> $c : RuleContext (paymentMethod == "P_EXPRESS", trustedUser==false, PEmailVerified==false)</div><div> $a : RuleAction (action == null)</div><div>then</div><div> modify($a) {</div><div> setAction ("VERIFY");</div>
<div> }</div><div>end</div><div><br></div><div><div>rule "EmailVerificationCheck #2"</div><div>salience 500</div><div>when</div><div> $c : RuleContext (paymentMethod == "P_EXPRESS", trustedUser==false, PEmailVerified==false)</div>
<div> $a : RuleAction (action == "VERIFY")</div><div>then</div><div> $a.getRuleNames().add("PEmailVerificationCheck");</div><div> update($a);</div><div>end</div></div><div><br></div></span><div class="gmail_quote">
2010/9/28 Vincent Legendre <span dir="ltr"><<a href="mailto:vincent.legendre@eurodecision.com" target="_blank">vincent.legendre@eurodecision.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
The follwing error seems to mean that context is defined twice. May
be that "context" is a reserved global variable in drools 5.<br>
Try to remane it in your rule, and check doc for more explanations<br>
<br>
<blockquote><span style="white-space:pre-wrap"></span>com/playspan/rule/Rule_PayPal_EmailVerificationCheck_0Eval0Invoker.java
(16:48) : <b>Redefinition of local variable "context"</b> </blockquote>
<br>
</div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br></div>