Thomas,
 
I was curious about this and tried to set up a minimal sample, and as far as I can tell, this is not possible.
 
Based on my testing, even if $a, $b, and $c ARE present, you cannot do this, because the evaluation short-circuits if $a is found, and therefore $b and $c are never defined.
 
Even putting null-checks around the do($a) lines won't work, because the error happens before the RHS is evaluated.
 
David Faulkner
david.faulkner@ametnra.com

From: rules-users-bounces@lists.jboss.org [rules-users-bounces@lists.jboss.org] On Behalf Of thomas.polzin@gmail.com [thomas.polzin@gmail.com]
Sent: Thursday, February 03, 2011 3:55 PM
To: rules-users@lists.jboss.org
Subject: [rules-users] Simple Disjunction Question

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