[
http://jira.jboss.com/jira/browse/JBRULES-1337?page=all ]
Edson Tirelli closed JBRULES-1337.
----------------------------------
Fix Version/s: 4.0.4
4.1.0
Resolution: Done
This is fixed in 4.0.x and trunk branches.
The problem was actually more serious than it appeared at first. The logic transformation
triggers some object cloning in the rule model. The code was doing a shallow clone and not
correctly updating the some of the pattern references causing inconsistencies in some
specific situations.
I updated the code to do deep clones and added some code to correctly update the
references.
Thanks for reporting and providing the instructions to reproduce.
Let us know please if you have any other problem.
'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
Fix For: 4.0.4, 4.1.0
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