Executable model build fails when negative literal value is set to BigDecimal type property in modify block

Solution Verified - Updated -

Issue

When negative literal value is set to BigDecimal type property in modify block like the following

dialect "mvel"

Rule "rule1"
    when 
        $fact: Fact()
    then
        modify($fact){
          bd = -1
        }
end

  Note: 'bd' is a BigDecimal type property.

maven build with -DgenerateModel=YES fails with an error like the following:

[ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.67.0.Final-redhat-00019:generateModel (default-generateModel) on project reproducer_bigdecimal_literal: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.67.0.Final-redhat-00019:generateModel failed: [com/example/reproducer/P51/LambdaConsequence51FE31BED8B91C756F6F900EB097A03B.java (28:1147) : The method setBd(BigDecimal) in the type Fact is not applicable for the arguments (int)] -> [Help 1]

Environment

  • Red Hat Decision Manager
    • 7.13

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