Unfortunately, no. 

   In forward chaining engines, "or" 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.

   Edson

2011/2/3 <thomas.polzin@gmail.com>
Hi there

Assume we have a rule like this:

when

$a : A(a==1)
or
($b : B(b==1) and $c : C(c==1))

then

do($a)
do($b)
do($c)

end


Assuming also, that for some reason I do not want to split this rule into two.
Then, I get a NullPointer exception because either $a or $b and $c are not defined.
Is there a way to catch or check for this.

Thanks so much for any help

Thomas
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com