-
Bug
-
Resolution: Done
-
Major
-
7.73.0.Final, 8.36.0.Final
-
None
-
2023 Week 12-14 (from Mar 20)
-
2
-
NEW
-
NEW
-
---
-
---
Issue Description:
With a rule like this,
rule R1 when $fact: Fact($id : a == 99999, convertToString($id) == "BIG") then modify($fact) { setResult("OK") }; end
non-exec-model doesn't react to the rule, but exec-model reacts to the rule and causes an infinite loop.
BAPL-1773 made engine analyze method arguments (in this case, '$id'). If it's a property, it works as property reactivity. However, in case of a bind variable, non-exec-model and exec-model work differently.
non-exec-model resolves the bind variable to a property name
https://github.com/kiegroup/drools/blob/7.73.0.Final/drools-mvel/src/main/java/org/drools/mvel/MVELConstraint.java#L460
exec-model doesn't resolve the bind variable, so considers "no property to react" (= class reactive) and results in the infinite loop.
https://github.com/kiegroup/drools/blob/7.73.0.Final/drools-model/drools-model-compiler/src/main/java/org/drools/modelcompiler/builder/generator/expressiontyper/ExpressionTyper.java#L622-L637
Acceptance Criteria:
Fix exec-model to resolve the bind variable to meet the non-exec-model behavior.
- is incorporated by
-
RHDM-1967 executable model doesn't resolve bind variable in method call in LHS for property reactivity
- Closed