<div><br></div>   Unfortunately, no. <div><br></div><div>   In forward chaining engines, &quot;or&quot; is just syntax sugar to automatically generate multiple rules (one for each logical branch) that would trigger the exact same consequence action. If you need different consequence actions, you need to write different rules. As a side effect of this, all variables used in the consequence must be defined in all logical branches.<div>
<br></div><div>   Edson<br><br><div class="gmail_quote">2011/2/3  <span dir="ltr">&lt;<a href="mailto:thomas.polzin@gmail.com">thomas.polzin@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi there<br><br>Assume we have a rule like this:<br><br>when<br><br> $a : A(a==1)<br> or<br> ($b : B(b==1) and $c : C(c==1))<br><br>then<br><br> do($a)<br> do($b)<br> do($c)<br><br>end<br><br><br>Assuming also, that for some reason I do not want to split this rule into two.<br>
Then, I get a NullPointer exception because either $a or $b and $c are not defined.<br>Is there a way to catch or check for this.<br><br>Thanks so much for any help<br><br>Thomas<br>_______________________________________________<br>

rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">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><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div></div>