[jboss-jira] [JBoss JIRA] (DROOLS-5271) RHS statements ordering changes with modify block in executable model
Toshiya Kobayashi (Jira)
issues at jboss.org
Fri Apr 24 01:10:00 EDT 2020
Toshiya Kobayashi created DROOLS-5271:
-----------------------------------------
Summary: 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: Luca Molteni
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}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list