How does RHDM/BRMS work when types are mismatched in a rule condition

Solution Unverified - Updated -

Issue

  • When there is a type mismatch (e.g. String vs Integer) in a constraint, sometimes the condition matches, sometimes not. What's the difference?
rule "R1"
    when
        MyFactA( $i : intData )
        $f : MyFactB( strData == $i )
    then
        System.out.println( "R1 fired : $f = " + $f );
end

rule "R2"
    when
        $f : MyFactB( strData == 20 )
    then
        System.out.println( "R2 fired : $f = " + $f );
end

Environment

  • Red Hat Decision Manager (RHDM)
    • 7.0.0

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