<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta content="MSHTML 6.00.6002.18332" name="GENERATOR">
<style title="owaParaStyle"><!--P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
--></style>
</head>
<body ocsi="x">
<div dir="ltr"><font face="Tahoma" color="#000000" size="2">Thomas,</font></div>
<div dir="ltr"><font face="tahoma" size="2"></font>&nbsp;</div>
<div dir="ltr"><font face="tahoma" size="2">I was curious about this and tried to set up a minimal sample, and as far as I can tell, this is not possible.</font></div>
<div dir="ltr"><font face="tahoma" size="2"></font>&nbsp;</div>
<div dir="ltr"><font face="tahoma" size="2">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.</font></div>
<div dir="ltr"><font face="tahoma" size="2"></font>&nbsp;</div>
<div dir="ltr"><font face="tahoma" size="2">Even putting null-checks around the do($a) lines won't work, because the error happens before the RHS is evaluated.
</font></div>
<div dir="ltr"><font face="tahoma" size="2"></font>&nbsp;</div>
<div>
<div><font face="Tahoma" size="2">David Faulkner</font></div>
<div><font face="tahoma" size="2"><a href="mailto:david.faulkner@ametnra.com">david.faulkner@ametnra.com</a></font></div>
</div>
<div id="divRpF89174" style="DIRECTION: ltr">
<hr tabindex="-1">
<font face="Tahoma" size="2"><b>From:</b> rules-users-bounces@lists.jboss.org [rules-users-bounces@lists.jboss.org] On Behalf Of thomas.polzin@gmail.com [thomas.polzin@gmail.com]<br>
<b>Sent:</b> Thursday, February 03, 2011 3:55 PM<br>
<b>To:</b> rules-users@lists.jboss.org<br>
<b>Subject:</b> [rules-users] Simple Disjunction Question<br>
</font><br>
</div>
<div></div>
<div>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</div>
</body>
</html>