In BRMS 6.4.8, changing the order of "forall" conditional elements combined with "or" causes NullPointerException

Solution Verified - Updated -

Issue

  • The following rule works fine:

    rule "Rule"
        when
            forall (Fact(tag == "X")) 
            forall(Fact(tag2 == "Y"))
            (
                forall(Fact(value == 42)) or
                Fact(value == 43) 
            )
        then
        end
    
  • Whereas this one produces a NullPointerException when matching an instance of Fact with {value:42, tag:"X", tag2: "Y"}:

    rule "Rule"
        when
            forall (Fact(tag == "X")) 
            (
                forall(Fact(value == 42)) or
                Fact(value == 43) 
            )
            forall(Fact(tag2 == "Y"))
        then
        end
    
  • Note the two rules are functionally equivalent. They only differ with respect to the order of the conditional elements.

Environment

  • Red Hat JBoss Business Rules Management System (BRMS) 6.4.8.

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