Greetings,<br><br>I have two questions regarding Drools&#39; capability:<br><br>1. Does Drools support mathematic operations in the &quot;If&quot; part?<br><br>If I use MVEL, can I write something like this:<br><br>&nbsp;$h: Holder($h.account.balance - 1000 &gt; 25)<br>
<br>I know this can be replaced as<br><br>&nbsp;$h: Holder($h.account.balance &gt;1025)<br><br>But I need to know if the first expression is valid. I tested and it did not work for me - am I doing something wrong?<br><br>2. Does Drools support function call with parameters?<br>
<br>If I use MVEL, can I write something like this:<br>
<br>...<br>import com.mytest.util.CommonFunction.myTest;<br>...<br><br>dialect &quot;mvel&quot;<br>salience 2<br>when<br>&nbsp; $h: Holder(eval(myTest($h.account.balance) &gt;= 0))<br>then<br>&nbsp; $r.account.label = 17;<br>&nbsp;update($r);<br>
end<br><br>myTest is a static method of CommonFunction.<br><br>From what I read in the doc, &quot;function&quot; is most useful in the then part - but can I use it in the &quot;if&quot; part? This does not work for me in my test - did I do anything wrong?<br>
<br>Any help will be appreciated.<br><br>Thanks,<br>Joe<br><br><br><br>