Arithmetic operation with bind variable of BigDecimal type in constraint fails in executable model build
Issue
A build of the following rule fails with executable model.
dialect "mvel"
rule "rule_multiply"
when
$fact : Fact( $bd: bd, bd2 == $bd * -1)
then
System.out.println("***** $fact = "+$fact);
end
This fails with :
Execution default-generateModel of goal org.kie:kie-maven-plugin:7.59.0.Final-redhat-00009:generateModel failed: [
com/example/reproducer/PCD/LambdaExtractorCD1B6E5C7CFD387685758203C8EB22B1.java (25:858) : The operator * is undefined for the argument type(s) BigDecimal, int,
com/example/reproducer/PF0/LambdaPredicateF08177C575A8F93768627585DF0FD322.java (25:1107) : The operator * is undefined for the argument type(s) BigDecimal, int]
This does not happen when building with non-executable model.
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.