[
http://jira.jboss.com/jira/browse/JBRULES-1337?page=all ]
Edson Tirelli reassigned JBRULES-1337:
--------------------------------------
Assignee: Edson Tirelli
'or' with predicate/return val/inline eval with property
issue
--------------------------------------------------------------
Key: JBRULES-1337
URL:
http://jira.jboss.com/jira/browse/JBRULES-1337
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.3
Reporter: Michal Bali
Assigned To: Edson Tirelli
Hi,
I have following rule that should never fire, but it does :)
package com.sample
import com.sample.DroolsTest.*;
rule "ruleThatShouldNeverFire"
when
Message( eval("somethingDifferent".equals(message)) ) # this
should never match
SomeBeanA( ) or SomeBeanB( )
then
System.out.println( drools.getRule().getName() + " fired and
shouldn't" );
end
stateful ruleSession with following insertions:
Message message = new Message();
message.setMessage( "Hello World" );
workingMemory.insert( message );
workingMemory.insert( new SomeBeanA() );
workingMemory.insert( new SomeBeanB() );
It behaves the same way if we use predicates or retun values:
#Message( msg : message -> ("somethingDifferent".equals (msg)) )
# this should never match
#Message( message == ("somethingDifferent".equals (message)) ) #
this should never match
It looks like the AlphaNode is missing from the Rete network.
Tested with Drools 4.0.3. Java build 1.5.0_11-b03.
Thank you for your time.
Regards,
Michal
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira