BRMS doesn't short-circuit with multiple evals with OR

Solution Unverified - Updated -

Issue

  • I have null checks in the first eval and actual value check in the next eval. When m.getValue() is null, since the first eval is true expecting second eval won't be called. But it results in NullPointerException.
rule "Hello World"
    when
        m : Message()
        and (eval(m.getValue() == null)
          or eval(m.getValue().equals("hello"))
        )
    then
        ...
end

Environment

  • Red Hat JBoss BRMS
    • 6.2

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