This was a regression due to substantial changes of the DRL compiler. MVEL strict mode has nothing to do with this.
I'm not sure when the fix was deployed, but you should have this MVEL2 jar in your classpath - check the size. And you may need a Drools built from the latest of the 5.2.0.M2 branch.
... 711693 2011-05-02 14:12 ./org/mvel/mvel2/2.1-SNAPSHOT/mvel2-2.1-20110501.033205-24.jar
... 711693 2011-05-02 14:12 ./org/mvel/mvel2/2.1-SNAPSHOT/mvel2-2.1-SNAPSHOT.jar
Tested successfully with
import function java.lang.Math.*;
rule x
when
$i: Imaginary( eval(atan2(im,re) > PI/4.0) )
then end
-W
I remember reading some stuff about changes in 5.2 regarding a new strict
mode -
http://docs.jboss.org/drools/release/5.2.0.M2/drools-introduction-docs/html_single/index.html#d0e354
So it might be a compile warning/issue... which you could fix, or I think
just turn off strict mode?
--
View this message in context: http://drools.46999.n3.nabble.com/5-2-0-M2-issue-using-import-functions-tp2865621p2891587.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users