-
Bug
-
Resolution: Done
-
Major
-
7.12.0.GA, 7.12.1.GA, 7.13.1.GA, 7.13.2.GA
In executable model, build of the following pattern in LHS of a rule fails with error message (*1) for generated Java code (*2). While the same build succeeds in non-executable model.
Fact( $ans : String.format("%,d", (value * new BigDecimal("1000")).longValue()) ) // "value" is a BigDecimal property of Fact class
(*1) Error message
[ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.67.0.Final-redhat-00019:generateModel (default-generateModel) on project reproducer_bd_op_in_constraint_1a: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.67.0.Final-redhat-00019:generateModel failed: [com/example/reproducer/P2A/LambdaExtractor2A3865EA6CC8B883951F6D08477ECCC6.java (21:795) : The operator * is undefined for the argument type(s) BigDecimal, long] -> [Help 1]
(*2) Java code generated in executable model
@Override() public java.lang.String apply(com.example.reproducer.Fact _this) { return String.format("%,d", _this.getValue() * new BigDecimal("1000").longValue()); }
- incorporates
-
DROOLS-7364 executable-model fails with BigDecimal arithmetic when it's a scope of a method call
- Resolved