-
Bug
-
Resolution: Done
-
Major
-
7.36.0.Final
-
None
-
2020 Week 16-18 (from Apr 13)
-
3
-
NEW
-
NEW
DROOLS-5025 solved a case like this by excluding getter property from property reactivity mask.
rule R1 when $p : Person( name == "Mario" ) then System.out.println("name = " + $p.getName()); modify($p) { setAge(41) }; end
However, there are still some cases which cause unexpected property reactivity.
For example, the rule below causes an infinite loop with executable model because "name" is considered as modified property.
rule R1 when $p : Person( name == "Mario" ) then System.out.println("name.length = " + $p.getName().length()); modify($p) { setAge(41) }; end
update() without modify block has the same issue.
In standard-drl (DialectUtil.parseModifiedProperties), "getter + otherMethod" chain is considered that the property is modified. So excutable model follows the same.
However, executable model evaluates all method calls in RHS while standard-drl evaluates only direct statements like "setName("AAA");" or "getName().xxx();". executable model also should follow.
- is incorporated by
-
RHPAM-2877 Drools Canonical Model causes infinite loop firing of rules
- Closed