Toshiya Kobayashi created DROOLS-5115:
-----------------------------------------
Summary: executable model fails with negation and BigDecimal
Key: DROOLS-5115
URL:
https://issues.redhat.com/browse/DROOLS-5115
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.33.0.Final
Reporter: Toshiya Kobayashi
Assignee: Luca Molteni
When you have a rule like:
{noformat}
when
$p : Person(!(money > 20))
{noformat}
, executable model fails with an error:
{noformat}
bad operand types for binary operator '>'
first type: java.math.BigDecimal
second type: int
{noformat}
This is because the generated code doesn't use EvaluationUtil.
{code:java}
org.drools.model.Rule rule =
D.rule("R").build(D.pattern(var_$p).expr("CE47D630E9C0B4A2A149ED40CEC3E3B0",
(org.drools.modelcompiler.domain.Person _this) -> !(_this.getMoney() > 20),
D.reactOn("money")),
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)