-
Bug
-
Resolution: Done
-
Major
-
7.68.0.Final
-
None
-
2022 Week 14-16 (from Apr 4)
-
2
-
NEW
-
NEW
-
---
-
---
dialect "mvel" rule "rule_multiply" when $fact : Fact( $bd: bd, bd2 == $bd * -1) then System.out.println("***** $fact = "+$fact); end
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]
generated code
public enum LambdaExtractorCD1B6E5C7CFD387685758203C8EB22B1 implements org.drools.model.functions.Function1<java.math.BigDecimal, java.lang.Object>, org.drools.model.functions.HashedExpression { ... @Override() public java.lang.Object apply(java.math.BigDecimal $bd) { return $bd * -1; } }
Note : There are 2 factors:
- bind variable
- negative value
- is cloned by
-
RHDM-1904 Arithmetic operation with BigDecimal in constraint fails in executable-model
- Closed