-
Bug
-
Resolution: Done
-
Major
-
7.9.0.GA
-
The issue was found in RHDM 7.9.0.
-
False
-
False
-
Release Notes
-
-
-
-
-
-
CR1
-
+
-
Undefined
-
-
-
2020 Week 49-51 (from Nov 30)
Compiling a rule like (*1) which is described in MVEL dialect and uses a compound assignment operation like BigDecimal_type_property += Numeric_value, for example,
- $bus.weight += 1000; ..... (6a) or
- num = 100; $bus.weight += num; ..... (6b)
with executable rule models enabled, errors like (*2) occur. $bus.weight is a BigDecimal type property.
This issue occurs in the case of using the other basic operations '-=', '*=', '/=' as well as '+='.
(*1)
package com.example.reproducer import com.example.reproducer.Bus dialect "mvel" rule "bus6a" when $bus : Bus() then $bus.weight += 1000; ..... (6a) System.out.println("***** " + $bus + ", weight = " + $bus.weight); update($bus); end
(*2)
[ERROR] /work2/cases/02801729/reproducer_02801729_6a_6b/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/P86/LambdaConsequence86B94E0EB0387F8D724213EF209CA726.java:[19,13] weight has private access in com.example.reproducer.Bus [ERROR] /work2/cases/02801729/reproducer_02801729_6a_6b/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/P86/LambdaConsequence86B94E0EB0387F8D724213EF209CA726.java:[19,21] bad operand types for binary operator '+' first type: java.math.BigDecimal second type: int
- is cloned by
-
DROOLS-5894 Compound assignment operation like BigDecimal_type_property += Numeric_value causes compilation errors in executable model.
- Closed