<br>&nbsp;&nbsp; This is fixed on 4.0.x branch. I will fix in trunk.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2008/2/8, 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; Ok, I see the problem. It is a bug that happens when mixing alpha and beta constraints under ||.<br>&nbsp;&nbsp; I will fix it.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br>&nbsp;&nbsp; <br><br><div><span class="gmail_quote">2008/2/8, Jai Vasanth &lt;<a href="mailto:jaivasanth@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jaivasanth@gmail.com</a>&gt;:</span><div>
<span class="e" id="q_117fa5ca5ee94817_1"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sorry... eval(reason == &#39;override&#39;)&nbsp; is not the right way to check for string equality doh. Yes yours is definitely the way to go. I have had the &#39;==&#39; work for many cases. In this case it seems to be not working when&nbsp; there are multiple boolean disjunctions along with them.<br>

<span>
<br>Jai </span><div><span><br><br><div class="gmail_quote">On Feb 8, 2008 8:52 AM, Jai Vasanth &lt;<a href="mailto:jaivasanth@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jaivasanth@gmail.com</a>&gt; wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Very interesting. I tried it too , I dont think its about the &#39;==&#39; because it seems to be working for eval( reason == &#39;override&#39;). So it is more to do with having the eval method call. <br>Nice find. Not too sure if this is a bug, or if there is a reason why drools works this way.<br>



<br><br>Thanks<br><font color="#888888"><br>Jai </font><div><div></div><div><br><br><div class="gmail_quote">On Feb 7, 2008 5:43 PM, ST &lt;<a href="mailto:super_thunder2@hotmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">super_thunder2@hotmail.com</a>&gt; wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I got it working by using the inline eval expression. &nbsp;The following is the<br>modified version of the rules.<br><div><br>rule &quot;Remove smaller or non-overriden&quot;<br> &nbsp; &nbsp;dialect &quot;java&quot;<br>
 &nbsp; &nbsp;when<br> &nbsp; &nbsp; &nbsp; &nbsp;L : Response( $r : value &amp;&amp; status != &quot;override&quot; )<br></div> &nbsp; &nbsp; &nbsp; &nbsp;Response( &nbsp;value &gt; $r || eval (status.equals(&quot;override&quot;)) )<br> &nbsp; &nbsp;then<br> &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;Retracting &quot; + L);<br>



 &nbsp; &nbsp; &nbsp; &nbsp;retract( L );<br>end<br><br>The Response class has two fields one is value and the other is status. &nbsp;For<br>convenience, I added a constructor where the first parameter is the value and<br>the second is the status. &nbsp;I have added the following objects into the working<br>



memory for testing.<br><br> &nbsp; &nbsp; &nbsp; &nbsp;final Response response1 = new Response(5,&quot;override&quot;);<br> &nbsp; &nbsp; &nbsp; &nbsp;final Response response2 = new Response(6,&quot;not override&quot;);<br> &nbsp; &nbsp; &nbsp; &nbsp;final Response response3 = new Response(7,&quot;not override&quot;);<br>



 &nbsp; &nbsp; &nbsp; &nbsp;final Response response4 = new Response(8,&quot;not override&quot;);<br> &nbsp; &nbsp; &nbsp; &nbsp;session.insert( response1 );<br> &nbsp; &nbsp; &nbsp; &nbsp;session.insert( response2 );<br> &nbsp; &nbsp; &nbsp; &nbsp;session.insert( response3 );<br> &nbsp; &nbsp; &nbsp; &nbsp;session.insert( response4 );<br>



<br> &nbsp; &nbsp; &nbsp; &nbsp;session.fireAllRules();<br><br>The result shows that the object, Response(5,&quot;override&quot;), is the only one left<br>after the all activated rules have been evaluated.<br><br>I am not sure why &quot;==&quot; does not work in this example. &nbsp;Is this a known bug?<br>



<div><div></div><div><br><br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org</a><br>

<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>

</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</span></div><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org</a><br>

<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></span></div>
</div><span class="sg"><br>
<br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.jboss.com</a>
</span></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<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>