<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Wolfgang,<br>
<br>
Sound like a bug. If you insert a single object, the method should
be called just once.<br>
<br>
Mark<br>
On 05/01/2012 08:52, Wolfgang Laun wrote:
<blockquote
cite="mid:CANaj1Lef18DAAT5Fq0BUgPXiFzbx3H+Hx9rzp4tVVAAxLzkveg@mail.gmail.com"
type="cite">Drools 5.3.0 FINAL.<br>
<br>
This experiment was inspired by code posted with the insinuation
that MVEL would "optimize" condition evaluation. - Consider this
rule:<br>
<br>
rule "Term - java"<br>
dialect "java"<br>
when<br>
$ea : EasyApp( Test.valueInList( $ea.getProductCode(), "CAR"
)==true<br>
&& age < 0 )<br>
then end<br>
<br>
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:<br>
<br>
rule "Term - mvel"<br>
dialect "mvel"<br>
when<br>
$ea : EasyApp( Test.valueInList( productCode, "CAR" )==true<br>
&& age < 0 )<br>
then end<br>
<br>
<i><b>Now Test.valueInList() is called twice for each inserted
fact.</b></i><br>
<br>
Cheers<br>
Wolfgang<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>