Use of @propertyReactive for a fact in rules leads to infinite looping of a rule when certain changes in the fact take place

Solution Unverified - Updated -

Issue

  • It has been observed that the use of @propertyReactive for a fact in rules leads to infinite looping of a rule when certain changes in the fact take place. For an example take a look at the following fact type and the rule which uses it.
...
declare Customer
    @propertyReactive
end
...

rule "Rule4"
ruleflow-group "Group2"

    when
       $cu : Customer(creditScore < 550 && family != null)
    then
        modify($cu){getFamily().setNonApprovedMember(true);}
        System.out.println("Setting family's approval to false");
end

This results in an infinite loop for the Rule4 being created.

...
Activation Created=Rule4
Setting family's approval to false
Activation Fired=Rule4
Activation Created=Rule4
Setting family's approval to false
Activation Fired=Rule4
Activation Created=Rule4
Setting family's approval to false
Activation Fired=Rule4
...
  • Is there an effective way to prevent this kind of inifinite looping?

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 6.0.x
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.