<br> Ronald,<br><br> In my tests, it works if you use a simple constraint. The problem only happens with constraints that use semantic code.<br> I tracked down the problem and it is in the LogicTransformer that is used when an "or" CE is present.
<br><br> []s<br> Edson<br><br><div><span class="gmail_quote">2007/11/21, Ronald R. DiFrango <<a href="mailto:ron.difrango@gmail.com">ron.difrango@gmail.com</a>>:</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( 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 class="e" id="q_1166233519a194e8_1">On Nov 21, 2007 4:05 AM, Michal Bali <<a href="mailto:michalbali@yahoo.ie" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
michalbali@yahoo.ie</a>> 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 class="e" id="q_1166233519a194e8_3">
<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> when<br> Message( eval("somethingDifferent".equals(message)) ) # this should never match<br> SomeBeanA( ) or SomeBeanB( )<br>
then
<br> System.out.println( drools.getRule().getName() + " fired and shouldn't" );<br>end<br><br>stateful ruleSession with following
insertions:<br> Message message = new Message();<br> message.setMessage( "Hello World" );<br> workingMemory.insert( message );<br> workingMemory.insert( new SomeBeanA() );
<br> workingMemory.insert( new SomeBeanB() );<br><br>It behaves the same way if we use predicates or retun values:<br> #Message( msg : message -> ("somethingDifferent".equals (msg)) ) # this should never match
<br> #Message( 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 href="http://uk.messenger.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://uk.messenger.yahoo.com</a> </div><br></span></div><span class="q">_______________________________________________
<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></span></blockquote></div><br>
<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646
<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>