Greetings,<br><br>I have two questions regarding Drools' capability:<br><br>1. Does Drools support mathematic operations in the "If" part?<br><br>If I use MVEL, can I write something like this:<br><br> $h: Holder($h.account.balance - 1000 > 25)<br>
<br>I know this can be replaced as<br><br> $h: Holder($h.account.balance >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 "mvel"<br>salience 2<br>when<br> $h: Holder(eval(myTest($h.account.balance) >= 0))<br>then<br> $r.account.label = 17;<br> update($r);<br>
end<br><br>myTest is a static method of CommonFunction.<br><br>From what I read in the doc, "function" is most useful in the then part - but can I use it in the "if" 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>