Drools 5.3.0 FINAL.
This experiment was inspired by code posted with the insinuation
that MVEL would "optimize" condition evaluation. - Consider this
rule:
rule "Term - java"
dialect "java"
when
$ea : EasyApp( Test.valueInList( $ea.getProductCode(), "CAR"
)==true
&& age < 0 )
then end
You'd expect that Test.valueInList() is called once per inserted
EasyApp fact, and this can be verified easily. - Now the same
rule, with MVEL's syntactic sugar:
rule "Term - mvel"
dialect "mvel"
when
$ea : EasyApp( Test.valueInList( productCode, "CAR" )==true
&& age < 0 )
then end
Now Test.valueInList() is called twice for each inserted
fact.
Cheers
Wolfgang
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users