The use of BigDecimal literal causes a build failure in executable model.

Solution Unverified - Updated -

Issue

Building rules written in MVEL dialect and using BigDecimal literal (numeric literal + suffix B) in executable rule model enabled causes an error.

When I build a maven project which contains rules using BigDecimal literal like (*1) with executable model enabled,

package com.example.reproducer

import com.example.reproducer.Bus

dialect "mvel"

rule "bus3c"
    when
        $bus : Bus()
    then
        modify($bus) {
            weight = 13000B    // ..... (*1)
        }
        System.out.println("***** " + $bus + ", weight = " + $bus.weight);
end

// weight is a BigDecimal type property of Bus class.

build error occurs with the message like below.

$ mvn clean compile -DgenerateModel=YES
...
[ERROR] Unable to build KieBaseModel:rules
CompilationProblemErrorResult: org.drools.mvelcompiler.MvelCompilerException: RHS doesn't have a type
Options
...

Environment

  • Red Hat Decision Manager (RHDM)
    • 7.5.0 - 7.9.1

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