]
Mario Fusco moved RHDM-1569 to DROOLS-5945:
-------------------------------------------
Component/s: executable model
(was: BRE)
Docs QE Status: NEW
Key: DROOLS-5945 (was: RHDM-1569)
QE Status: NEW
Affects Version/s: (was: 7.5.0.GA)
(was: 7.4.1.GA)
(was: 7.6.0.GA)
(was: 7.5.1.GA)
(was: 7.7.0.GA)
(was: 7.8.0.GA)
(was: 7.7.1.GA)
(was: 7.9.0.GA)
(was: 7.8.1.GA)
Workflow: GIT Pull Request workflow (was: CDW with docs v1)
Environment: (was: This issue occurs on releases from RHDM 7.4.1 to 7.9.0.)
Project: Drools (was: Red Hat Decision Manager)
Type coercion does not work for bound variables in executable model.
--------------------------------------------------------------------
Key: DROOLS-5945
URL:
https://issues.redhat.com/browse/DROOLS-5945
Project: Drools
Issue Type: Bug
Components: executable model
Reporter: Mario Fusco
Assignee: Mario Fusco
Priority: Major
Labels: support
Attachments: reproducer_model_compiler_15a.zip
When executing a rule like (\*1) that uses comparison between different-type bound
variables (for example, an Integer variable and a String variable consisting of digit
characters like (\*1-1)), the action part of the rule is unexpectedly fired in executable
model though the result of the comparison is expected to be {{false}}.
(\*1)
{noformat}
package com.example.reproducer
import static com.example.reproducer.CommonUtils.getListSize
dialect "java"
rule "rule15a1"
when
Order( $target : "3",
$items : getListSize(items),
$items != $target ) // ..... (*1-1)
then
System.out.println("***** Action of rule15a1 -- $items = " + $items);
end
{noformat}