In a rule in "mvel" dialect mode, binary operation including BigDecimal type values like $p.salary = $p.salary + 50000 ($p.salary is BigDecimal type property) causes compilation error in executable model. The error message is as follows:
[INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /work2/cases/02713159/reproducer_02713159/target/generated-sources/drools-model-compiler/main/java/org/example/reproducer/Rules2a5935db629e45d8b951392188ce055cRuleMethods0.java:[36,76] salary has private access in org.example.reproducer.Person ..... (*1) [ERROR] /work2/cases/02713159/reproducer_02713159/target/generated-sources/drools-model-compiler/main/java/org/example/reproducer/Rules2a5935db629e45d8b951392188ce055cRuleMethods0.java:[36,101] bad operand types for binary operator '+' ..... (*2) first type: java.math.BigDecimal second type: int [INFO] 2 errors
Additional Notes:
- When $p.salary is int type property, compilation succeeds.
- When $p.salary is Integer type property, the error (*2) does not occur but the error (*1) occurs.