Greetings, I have two questions regarding Drools' capability:
1. Does Drools support mathematic operations in the "If" part? If I use MVEL, can I write something like this: $h: Holder($h.account.balance - 1000 > 25) I know this can be replaced as $h: Holder($h.account.balance >1025) 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? 2. Does Drools support function call with parameters? If I use MVEL, can I write something like this: ... import com.mytest.util.CommonFunction.myTest; ... dialect "mvel" salience 2 when $h: Holder(eval(myTest($h.account.balance) >= 0)) then $r.account.label = 17; update($r); end myTest is a static method of CommonFunction. >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? Any help will be appreciated. Thanks, Joe
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users