Arithmetic operation with String coercion in constraint fails in executable-model

Solution Verified - Updated -

Issue

When rule condition looks like the following, build with executable model fails.

rule R1
dialect "mvel"
when
  StrBdHolder($str: str, bd == $str * -1)
then
end

The error is :

The operator * is undefined for the argument type(s) String, int

In this example, bd is BigDecimal type property and str is String type property.

i.e. Arithmetic operation with the following parameters in condition fails.

  • bind variable of String type
  • negative literal number

Environment

  • Red Hat Decision Manager
    • 7.12.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