[
https://issues.jboss.org/browse/JBRULES-3211?page=com.atlassian.jira.plug...
]
Edson Tirelli resolved JBRULES-3211.
------------------------------------
Assignee: Edson Tirelli (was: Mark Proctor)
Fix Version/s: 5.3.0.Final
Resolution: Duplicate Issue
This was a duplicate of JBRULES-3111. I tried your test case against master, that is being
used for the release of Drools 5.3.0.final and it is working fine.
Thank you for reporting, providing test case, and good job on your analysis as well. It
was correct.
Rules fires on incorrect condition
----------------------------------
Key: JBRULES-3211
URL:
https://issues.jboss.org/browse/JBRULES-3211
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.2.0.Final
Reporter: Tommy Odom
Assignee: Edson Tirelli
Fix For: 5.3.0.Final
Attachments: DroolsTest.tar.gz
We are running into some issues after upgrading to Drools 5.2.0 from Drools 5.1.1. Our
rules are no longer executing correctly. The wrong rule fires due to the constraints of a
previous rule. I wrote a standalone test that replicates the problem and I've tested
with 5.3.0-SNAPSHOT and the tests fail there as well.
Forgive me if what I state is incorrect but I figured I'd try to relay some of what I
observed in debugging. It appears that the difference between 5.1.1 and 5.2.0 comes from
the handling of the constraints. In 5.1.1, the constraints were created as
PredicateConstraints but in 5.2.0 they are being created as LiteralConstraints. As such,
in 5.1.1 in the CompositeObjectSinkAdapter adds the new sinks as otherSinks but in 5.2.0
they are registered as FieldIndexes. However, the index value on all of the
MVELClassFieldReader instances is 0 so both "engine.engineType.id" and
"engine.id" are mapped to the same FieldIndex.
I haven't had time yet to dig into the code to understand the difference between a
PredicateConstraint and a LiteralConstraint so I'm not sure if there's something I
could be doing differently to avoid this problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira