<br>&nbsp;&nbsp; Assuming you are using 4.0, just bind one and compare to the other:<br><br>rule XXX<br>when<br>&nbsp;&nbsp;&nbsp; Tree( $new : newNumberLeaves, oldNumberLeaves &gt; $new )<br>then<br>&nbsp;&nbsp; // do something<br>end<br>&nbsp;<br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson
<br><br><div><span class="gmail_quote">2007/6/7, Wagner Rick - rwagne &lt;<a href="mailto:Rick.Wagner@acxiom.com">Rick.Wagner@acxiom.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&#39;d like to make a comparison of two attributes on the same object, but<br>would like to do it in one line to facilitate easy DSL.<br><br>Example:<br><br>Class Tree{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int oldNumberLeaves;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int newNumberLeaves;
<br>}<br><br>What I&#39;d like to say is &quot;when the oldNumberLeaves &gt; newNumberLeaves<br>then....&quot;<br><br>Can anyone give me a tip on this one?<br><br>Thanks much,<br><br>Rick<br>*************************************************************************
<br>The information contained in this communication is confidential, is<br>intended only for the use of the recipient named above, and may be<br>legally privileged.<br><br>If the reader of this message is not the intended recipient, you are
<br>hereby notified that any dissemination, distribution or copying of this<br>communication is strictly prohibited.<br><br>If you have received this communication in error, please resend this<br>communication to the sender and delete the original message or any copy
<br>of it from your computer system.<br><br>Thank you.<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>