Given the different structure of the terms of the disjunction, there is no valid
reason for not splitting such a rule except to avoid code repetition. But:
(a) If the disjunction is at the end of a sequence of patterns, the
"extend" feature
can be used.
(b) If the consequence is very similar (obviously, it can't be quite the same
if the bound variables should serve any purpose) , common parts of the RHS
can be written as functions.
-W
2011/2/3 <thomas.polzin(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users