Thanks, I&#39;ll try using 3.1M1 version.<br><br>PS: I&#39;ve sent the same question to the mailing list using the label [rule-users] in the mail object, sorry for the repetition :-)<br><br><div><span class="gmail_quote">2007/3/13, Edson Tirelli &lt;
<a href="mailto:tirelli@post.com">tirelli@post.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>&nbsp;&nbsp;&nbsp;&nbsp;Francesco,<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;You need to be careful when doing that, if you are using 3.0.x version.<br>&nbsp;&nbsp;&nbsp;&nbsp;First thing is that both sides of your &quot;or&quot; must be perfectly<br>&quot;balanced&quot;, i.e., the same classes in the same order. I didn&#39;t tried
<br>that, but I think it works if you simply declare your binding once:<br><br>rule &quot;orCondition&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myObj : (MyObject(field1 == &quot;a&quot;, $field2 : field2, $field3 :<br>field3) or MyObject(field1 == &quot;b&quot;))&nbsp;&nbsp;&nbsp;&nbsp;//correct column
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AnotherPattern( attr2 == $field2, attr3 == $field3 )<br>&nbsp;&nbsp;&nbsp;&nbsp;then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;fields = &quot;+ field2 + field3);<br>end<br><br>&nbsp;&nbsp;&nbsp;&nbsp;This is a workaround for the 3.0.x versions.Try it and let me know plz.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;In 3.1M1 and later, all this is fixed and the correct is to declare<br>the variable in all logical branches:<br><br>rule &quot;orCondition&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myObj : (MyObject(field1 == &quot;a&quot;, $field2 : field2, $field3 :
<br>field3) or MyObject(field1 == &quot;b&quot;, $field2 : field2, $field3 :<br>field3))&nbsp;&nbsp;&nbsp;&nbsp;//correct column<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AnotherPattern( attr2 == $field2, attr3 == $field3 )<br>&nbsp;&nbsp;&nbsp;&nbsp;then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;fields = &quot;+ field2 + field3);
<br>end<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><br>Francesco Campagnola wrote:<br><br>&gt; Hi,<br>&gt;<br>&gt; I&#39;d like to write a rule that contains an OR condition in the LHS, to<br>&gt; match the presence in the working memory of an object with particular
<br>&gt; values of a specific field.&nbsp;&nbsp;In the rest of LHS, i need to bind other<br>&gt; values of the specific object matched. Is there a particular sintax to<br>&gt; use for the binding?<br>&gt;<br>&gt; For example:<br>&gt;
<br>&gt; rule &quot;orCondition&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myObj : (MyObject(field1 == &quot;a&quot;) or MyObject(field1 ==<br>&gt; &quot;b&quot;))&nbsp;&nbsp;&nbsp;&nbsp;//correct column<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; field2: myObj.getField2
 ()&nbsp;&nbsp;&nbsp;&nbsp;// how to correctly get<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; field3: myObj.getField3()&nbsp;&nbsp;&nbsp;&nbsp;// those values?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;fields = &quot;+ field2 + field3);<br>&gt;<br>&gt; Thanks in advance, FC.
<br>&gt;<br>&gt;------------------------------------------------------------------------<br>&gt;<br>&gt;_______________________________________________<br>&gt;rules-users mailing list<br>&gt;<a href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br>&gt;<a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;<br><br><br>--<br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer
<br> Office: +55 11 3124-6000<br> Mobile: +55 11 9218-4151<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><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>