]
Toshiya Kobayashi reassigned DROOLS-5271:
-----------------------------------------
Assignee: Toshiya Kobayashi (was: Luca Molteni)
RHS statements ordering changes with modify block in executable
model
---------------------------------------------------------------------
Key: DROOLS-5271
URL:
https://issues.redhat.com/browse/DROOLS-5271
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.36.0.Final
Reporter: Toshiya Kobayashi
Assignee: Toshiya Kobayashi
Priority: Major
The order of statements in RHS changes with executable model when modify block is
involved. The below rule can tell the difference with standard-drl.
{noformat}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{noformat}