From with modify fires unexpected rule
Issue
The rules below expect that only "R1" is fired when Person ("John", 20) is inserted. However, "R2" is also fired though age is set to 5 in modify block.
rule "R1"
salience 1
when
$p : Person()
Person( age > 10 ) from $p
then
modify ($p) {
setAge(5);
}
System.out.println( "R1, " + $p);
end
rule "R2"
salience 0
when
$p : Person()
Person( age > 10 ) from $p
then
System.out.println( "R2, " + $p);
end
Environment
- Red Hat Decision Manager
- 7.1.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.