[jboss-jira] [JBoss JIRA] (DROOLS-5115) executable model fails with negation and BigDecimal
Toshiya Kobayashi (Jira)
issues at jboss.org
Mon Mar 2 07:59:04 EST 2020
[ https://issues.redhat.com/browse/DROOLS-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Toshiya Kobayashi updated DROOLS-5115:
--------------------------------------
Story Points: 4
> 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: Toshiya Kobayashi
> Priority: Major
>
> 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)
More information about the jboss-jira
mailing list