<br>&nbsp;&nbsp; Eval&#39;s are indeed less performatic than any other type of constraints. &quot;inline-evals&quot; are not as bad, but are also heavier than regular constraints. <br>&nbsp;&nbsp; The recommendation is to avoid when possible, but for some cases it is not possible.
<br><br>&nbsp;&nbsp; If you are using MR3 or later, you can use MVELs syntax in your constraints:<br><br>when<br>&nbsp;&nbsp; MyClass( aMapAttribute[&#39;aKey&#39;] == &quot;some Value&quot; )<br>then<br>&nbsp;&nbsp; ...<br>end<br><br>&nbsp;&nbsp;&nbsp; The above will transparently be translated to an inline-eval, but that is the best you can do when working with maps.
<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><br><div><span class="gmail_quote">2007/7/2, Rajesh_Kumar &lt;<a href="mailto:Rajesh_Kumar@rsystems.com">Rajesh_Kumar@rsystems.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br><br>I want to use &quot;eval&quot; in my rules, but in rule writing guidelines Mark<br>has<br>Written that &quot;Eval is Evil&quot;.<br><br>I want to compare the values of Hash Map in my when (conditions) part.
<br><br>1) Will anyone suggest something so that I can compare Hash Map keys in<br>when part?<br><br>2) Does is there any performance related issue related to &quot;eval&quot;;<br><br>Regards<br><br>Rajesh<br><br>--<br>This message has been scanned for viruses and
<br>dangerous content by MailScanner, and is<br>believed to be clean.<br><br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer
<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>