<br>   For arbitrary method calls, the only way is to use an eval:<br><br>VO( eval( computePrice(&quot;key&quot;) &lt; 10 ) )<br><br>   Although, if you have a method that returns a map, you can use simplified Map syntax:<br>
<br>class VO {<br>   ...<br>   public Map getComputeMap() {...}<br>}<br><br>   Then:<br><br>VO( computeMap[&quot;key&quot;] &lt; 10 )<br><br><br>   []s<br>   Edson<br><br><div class="gmail_quote">2009/6/1 Vidya Chandrasekaran <span dir="ltr">&lt;<a href="mailto:aydiv.c@gmail.com">aydiv.c@gmail.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;"><br>Hi,<br><br>I am fairly new to Drools and am just getting my feet wet with writing rules. <br>
<br>In my work, I have to integrate drools with classes that do not expose all properties via getXXX/ isXXX accessor methods but require a call of the form someMethod(&quot;keyvalue&quot;). I have been using the MVEL dialect and do not see a way to call a function with arguments on the LHS side of a rule either in the documentation or the mailing list.<br>


<br><br>In fact, I have been trying something like<br><br>rule &quot;rulename&quot;<br>    agenda-group &quot;evaluation&quot;    <br>when<br>    $d: VO( computePrice(&quot;key&quot;) &lt; 10) from entry-point &quot;Inventory stream&quot;       <br>


then        <br>    #    <br>end<br><br>This fails with a &#39;no viable alternative at input &#39;&quot;key&quot;&#39; in rule. Is there a way this can be accomplished?<br><br>Thanks,<br><font color="#888888">Vidya<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><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>