<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi Edson,<br><br>Slovakia. Beer would be nice ;)<br><br>I'll wait for 4.0.4 release. I'm currently using 'eval' (not inline) as a workaround.<br><br>Thanks again for your effort.<br>Michal<br>&nbsp;<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Edson Tirelli &lt;tirelli@post.com&gt;<br>To: Rules Users List &lt;rules-users@lists.jboss.org&gt;<br>Sent: Wednesday, 21 November, 2007 6:36:17 PM<br>Subject: Re: [rules-users] 'or' with predicate/return val/inline eval with property issue?<br><br><br>&nbsp;&nbsp; Michal,<br><br>&nbsp;&nbsp; Where are you from? We should pay you a beer for this bug report... :)<br><br>&nbsp;&nbsp; Looked like a
 simple thing, but it was the most annoying bug I had to deal with in a long time. :(<br><br>&nbsp;&nbsp; Thanks for reporting. It is fixed and will be released in 
4.0.4 and 4.1.0. <br>&nbsp;&nbsp; If you want, while 4.0.4 is not released, you can build it yourself from here: <a rel="nofollow" target="_blank" href="http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/">http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/
</a><br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/11/21, Michal Bali &lt;<a rel="nofollow" ymailto="mailto:michalbali@yahoo.ie" target="_blank" href="mailto:michalbali@yahoo.ie">michalbali@yahoo.ie</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;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi Edson,<br><br>I've created new JIRA issue - <b>
<a rel="nofollow" target="_blank" href="http://jira.jboss.com/jira/browse/JBRULES-1337">JBRULES-1337</a><br><br></b>Thank you for your time on this.<b><br></b>Regards,<br><span class="sg">
Michal</span><div><span class="e" id="q_11662aeb6f7c959a_2"><br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Edson Tirelli &lt;<a rel="nofollow" ymailto="mailto:tirelli@post.com" target="_blank" href="mailto:tirelli@post.com">
tirelli@post.com</a>&gt;<br>To: <a rel="nofollow" ymailto="mailto:difranr@alumni.pitt.edu" target="_blank" href="mailto:difranr@alumni.pitt.edu">difranr@alumni.pitt.edu</a>; Rules Users List &lt;<a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a>&gt;<br>Sent: Wednesday, 21 November, 2007 12:48:54 PM<br>Subject: Re: [rules-users] 'or' with predicate/return val/inline eval with property issue?<br><br><br>&nbsp;&nbsp;&nbsp; Ronald,<br><br>&nbsp;&nbsp;&nbsp; In my tests, it works if you use a
 simple constraint. The problem only happens with constraints that use semantic code.<br>&nbsp;&nbsp;&nbsp; I tracked down the problem and it is in the LogicTransformer that is used when an "or" CE is present.
<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/11/21, Ronald R. DiFrango &lt;<a rel="nofollow" ymailto="mailto:ron.difrango@gmail.com" target="_blank" href="mailto:ron.difrango@gmail.com">
ron.difrango@gmail.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;">
One question do you get different reslts if you do the folowing for the first rule:<br><br>Message(&nbsp; message == "somethingDifferent" ) # this should never match<br><br>All I did was eliminate the eval and the explicit call to equals
<br><br><div class="gmail_quote"><div><span>On Nov 21, 2007 4:05 AM, Michal Bali &lt;<a rel="nofollow" ymailto="mailto:michalbali@yahoo.ie" target="_blank" href="mailto:michalbali@yahoo.ie">
michalbali@yahoo.ie</a>&gt; wrote:<br></span></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><span>

<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hi,<br><br>I have following rule that should never fire, but it does :)<br><br>package com.sample<br>import com.sample.DroolsTest.*


;<br>rule "ruleThatShouldNeverFire"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Message(&nbsp; eval("somethingDifferent".equals(message)) ) # this should never match<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SomeBeanA( ) or SomeBeanB( )<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println( drools.getRule().getName() + " fired and shouldn't" );<br>end<br><br>stateful ruleSession with following
 insertions:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Message message = new Message();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message.setMessage(&nbsp; "Hello World" );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workingMemory.insert( message );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workingMemory.insert( new SomeBeanA() );
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workingMemory.insert( new SomeBeanB() );<br><br>It behaves the same way if we use predicates or retun values:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Message(&nbsp; msg : message -&gt; ("somethingDifferent".equals (msg)) ) # this should never match
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Message(&nbsp; message == ("somethingDifferent".equals (message)) ) # this should never match<br><br>It looks like the AlphaNode is missing from
 the Rete network.<br><br>Tested with Drools 4.0.3. Java build 1.5.0_11-b03.<br><br>Any ideas if this is a bug or am I doing something wrong?<br><br>Thanks.<br>Regards,<br>Michal<br></div></div><br>Send instant messages to your online friends 
<a rel="nofollow" target="_blank" href="http://uk.messenger.yahoo.com">http://uk.messenger.yahoo.com</a> </div><br></span></div><span>_______________________________________________
<br>rules-users mailing list<br><a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br><a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br><br></span></blockquote></div><br>
<br>_______________________________________________<br>rules-users mailing list<br><a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br><a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></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 rel="nofollow" target="_blank" href="http://www.jboss.com">www.jboss.com</a>
</div><br></span></div></div></div><div><span class="e" id="q_11662aeb6f7c959a_4"><br>Send instant messages to your online friends <a rel="nofollow" target="_blank" href="http://uk.messenger.yahoo.com">
http://uk.messenger.yahoo.com</a> </span></div></div><br>_______________________________________________<br>rules-users mailing list<br><a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br><a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br><br></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 rel="nofollow" target="_blank" href="http://www.jboss.com">
www.jboss.com</a>
</div><br></div></div><br>Send instant messages to your online friends http://uk.messenger.yahoo.com </body></html>