Hi,<br><br><br>&nbsp;Suppose I have a class Foo with integers a, b&nbsp; and c&nbsp; ( methods getA&nbsp; getB and getC respectively ) and I Want to check if an object of Foo satisfies<br><br>a - (b + c) &gt; 0<br><br>Is this the best way&nbsp; I go about doing this ?<br>
<br>rule &quot;Foo check&quot;<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Foo( varA : a , varB:b, varC:c )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval( varA - (varB + varC) &gt; 0 )<br>&nbsp;&nbsp;&nbsp; then <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;do actions&gt;<br>&nbsp;end<br><br><br><br>Writing this as <br>
<br>rule &quot;Foo check&quot;<br>
&nbsp;&nbsp;&nbsp; when<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Foo( a - (b + c) &gt; 0 )<br>&nbsp;&nbsp;&nbsp; then <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;do actions&gt;<br>
&nbsp;end<br><br>doesnt seem to work. Its not able to find the variables (a, b and c ) from the getA getB and get C methods.<br><br>Thanks<br><br>Jai <br>