<br>&nbsp;&nbsp; Sergey,<br><br>&nbsp;&nbsp; That is how it is supposed to work. A field constraint in Drools always has a field at its left side. If you want arbitrary expression, just embed it in an inline eval:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S : Supplier(
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sts&nbsp;&nbsp;: supplierBusinessStatus.businessStatus,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $csts : corporateSupplier.supplierBusinessStatus.businessStatus,&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval ( $sts != $csts )&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )
<br><br>&nbsp;&nbsp; Although, for this specific case, it would be better (more performatic) to simply write:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S : Supplier(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sts&nbsp;&nbsp;: supplierBusinessStatus.businessStatus,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $csts : corporateSupplier.supplierBusinessStatus.businessStatus != $sts<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>
<br>&nbsp;&nbsp;&nbsp;
[]s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/8/10, Manukyan, Sergey &lt;<a href="mailto:SManukyan@lear.com">SManukyan@lear.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;">
<br>Folks,<br><br>I found that drools 4.0GA doesn&#39;t recognize variables in the left side<br>of operator expression<br><br>Like this produces error:<br><br><br>When<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S : Supplier(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sts&nbsp;&nbsp;: supplierBusinessStatus.businessStatus
,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$csts :<br>corporateSupplier.supplierBusinessStatus.businessStatus,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sts != $csts<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br>Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br><br><br><br>It tries to treat the $sts variable as a field of Supplier, instead
<br>understanding that it is a variable declared earlier,<br><br>Please advise,<br><br>Thanks,<br><br>-Sergey<br><br><br><br><br>**********************<br>** LEGAL DISCLAIMER **<br>**********************<br><br>This E-mail message and any attachments may contain
<br>legally privileged, confidential or proprietary<br>information. If you are not the intended recipient(s),<br>or the employee or agent responsible for delivery of<br>this message to the intended recipient(s), you are<br>
hereby notified that any dissemination, distribution<br>or copying of this E-mail message is strictly<br>prohibited. If you have received this message in<br>error, please immediately notify the sender and<br>delete this E-mail message from your computer.
<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>