-
Bug
-
Resolution: Done
-
Major
-
7.67.0.Final, 7.74.0.Final, 8.40.0.Final
-
None
-
2023 Week 27-29 (from Jul 3)
-
2
-
NEW
-
NEW
-
---
-
---
Issue Description:
When exec-model rewrites the following RHS,
then if (false) { modify($fact) { value1 = 2 } }
it moves "drools.update" to the end of execute method. It causes an unexpected update.
public void execute(org.drools.model.Drools drools, org.drools.modelcompiler.PropertyReactivityMatrixTest.Fact $fact) throws java.lang.Exception { if (false) { { $fact.setValue1(2); } } drools.update($fact, mask_$fact); } }
Another test case is
then if (false) { $fact.setValue1(2); } if (true) { modify($fact) { } }
becomes
@Override() public void execute(org.drools.modelcompiler.PropertyReactivityMatrixTest.Fact $fact) throws java.lang.Exception { { if (false) { $fact.setValue1(2); } if (true) { { } } } }
Acceptance Criteria:
drools.update is executed in the same if-block.
Additional Information:
Found while working on DROOLS-7492
- is incorporated by
-
RHDM-1993 Behavior of multiple updates in executable model is different from non-executable model.
- Closed
- is related to
-
DROOLS-7497 Consider property reactivity analysis. Only before "modify/update" or whole RHS
- Resolved
- relates to
-
DROOLS-7492 Property reactivity inconsistent behavior when modify-block is placed inside a block like if-block in RHS
- Resolved