This isn&#39;t quite right:<br><br><div class="gmail_quote">2010/8/16 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>     You can&#39;t use the cast and the method call in a regular constraint. You can use it as part of an expression. So:</div><div><br></div><div><div class="im"> $min_score : Number ()<br>   from accumulate (Client (productTypeExperience.keySet contains $name,<br>
</div>
                     $score : productTypeExperience[$name],<br>                     min ( ((ExperienceLevel)$score).value() ) )</div></blockquote><div><br> from accumulate (Client (productTypeExperience.keySet contains $name,<br>

                     $score : productTypeExperience[$name]   )   #### terminate the Client pattern<br><div>                     min ( ((ExperienceLevel)$score).value() )  )    ###  here the accumulate ends<br></div><br> </div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br></div><div>     We are working on the support of free form expressions on constraints for Drools 6 (not sure we can make it for 5.2).</div>

<div><br></div><div>     Edson</div><br><br><div class="gmail_quote">2010/8/15 Manav <span dir="ltr">&lt;<a href="mailto:manav7574@yahoo.com" target="_blank">manav7574@yahoo.com</a>&gt;</span><div><div></div><div class="h5">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
I am trying my hand at the accumulate function in Drools 5.x but the drl fails<br>
to compile.<br>
Not sure what&#39;s wrong with it. Please help.<br>
This is the sample that i am working with<br>
<br>
rule &quot;Test Accumulate Function&quot;<br>
when<br>
 $p : ProductType ($name : name)<br>
 $min_score : Number ()<br>
   from accumulate (Client (productTypeExperience.keySet contains $name,<br>
                     $score :<br>
((ExperienceLevel)productTypeExperience[$name]).value()),<br>
              min ($score))<br>
then<br>
 System.out.println (&quot;$min_score&quot; + $min_score);<br>
end<br>
Regards,<br>
<font color="#888888">Manav<br>
</font><div><div></div><div><br>
<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>

</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>