Should string compare, '==' be used to compare two strings in rule engine?

Solution Verified - Updated -

Issue

  • I noticed that for string compare, the == does not work. I had to use equals in order for the expression to evaluate to true. If I use ==, then the expression evaluates to false.

  • In drools, my understanding is that == is comparing the content of the object. Can you confirm whether this understanding is correct?

eval($code == "428.0" || $code == "486" || $code == "786.5") // cannot use "=="

Environment

  • Red Hat JBoss BPM Suite

    • 6
  • Red Hat JBoss BRMS

    • 6

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