From with modify fires unexpected rule

Solution In Progress - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content