-
Bug
-
Resolution: Done
-
Major
-
None
-
7.24.0.Final
-
2019 Week 29-31, 2019 Week 32-34
-
3
-
- See unit test PR
-
NEW
-
NEW
When "from accumulate" uses BigDecimal with Mvel syntax,
for example)
import org.drools.modelcompiler.domain.Person; import java.math.BigDecimal; global java.util.List list; dialect "mvel" rule R when $b : BigDecimal() from accumulate ( Person( $money : money ), init( BigDecimal sum = 0; ), action( sum += $money; ), reverse( sum -= $money; ), result( sum ) ) then list.add($b); end
It works with non executable-model but fails with executable-model.
[ERROR] Failures: [ERROR] AccumulateTest.testFromAccumulateBigDecimalMvel:1273->BaseModelTest.getKieSession:99->BaseModelTest.getKieSession:103->BaseModelTest.getKieContainer:107->BaseModelTest.getKieContainer:114->BaseModelTest.createKieBuilder:125->BaseModelTest.createKieBuilder:152 [Message [id=1, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=28, column=20 text=incompatible types: int cannot be converted to java.math.BigDecimal], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=32, column=18 text=bad operand types for binary operator '+' first type: java.math.BigDecimal second type: java.math.BigDecimal], Message [id=3, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=36, column=18 text=bad operand types for binary operator '-' first type: java.math.BigDecimal second type: java.math.BigDecimal], Message [id=4, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=0, column=0 text=Java source of src/main/java/defaultpkg/RAccumulate6.java in error: package defaultpkg
- is incorporated by
-
RHDM-1033 BigDecimal in from accumulate with MVEL with executable-model
- Closed