-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
2022 Week 35-37 (from Aug 29)
-
2
-
NEW
-
NEW
-
---
-
---
Drools 8.26.0.Beta
rule r1 when $p : Person( name == "Luca", likes == "food") then results.add($p); end rule r2 when $p : Person( name == "Luca", likes == "videogames") then results.add($p); end rule r3 when $p : Person( name == "Luca", likes == "music") then results.add($p); end
The first condition name == "Luca" is not effective ("Mario" passes). This issue only happens when the second condition has more than 3 variations (= AlphaNode hash-indexed).
See that " if (mVELConstraint4.isAllowed(handle, wm)) { } " does nothing in the generated code.
public final void propagateAssertObject(org.drools.core.common.InternalFactHandle handle, org.drools.core.common.PropagationContext context, org.drools.core.common.ReteEvaluator wm) { if (logger.isDebugEnabled()) { logger.debug("propagateAssertObject on compiled alpha network {} {} {}", handle, context, wm); } org.drools.ancompiler.Person fact = (org.drools.ancompiler.Person) handle.getObject(); if (mVELConstraint4.isAllowed(handle, wm)) { } java.lang.String switchVar = (java.lang.String) readAccessor.getValue(fact); if (switchVar != null) switch(switchVar) { case "music": extractedPropagated_2CAF6357FABCEA1AEBA4E47B9C398F0D_0(handle, context, wm); break; case "videogames": extractedPropagated_2CAF6357FABCEA1AEBA4E47B9C398F0D_1(handle, context, wm); break; case "food": extractedPropagated_2CAF6357FABCEA1AEBA4E47B9C398F0D_2(handle, context, wm); break; } }
- causes
-
PLANNER-2780 Match rule incorrectly using drools
- Resolved