]
Mario Fusco moved RHDM-1562 to DROOLS-5941:
-------------------------------------------
Component/s: executable model
(was: BRE)
Docs QE Status: NEW
Key: DROOLS-5941 (was: RHDM-1562)
QE Status: NEW
Affects Version/s: (was: 7.8.0.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 does not occur on releases from RHDM 7.1.0 to
7.7.1 but occurs on releases from RHDM 7.8.0 to 7.9.0.)
Project: Drools (was: Red Hat Decision Manager)
Order of parameters passed to the method called in accumulate
function action() is unexpectedly changed in executable model.
----------------------------------------------------------------------------------------------------------------------------
Key: DROOLS-5941
URL:
https://issues.redhat.com/browse/DROOLS-5941
Project: Drools
Issue Type: Bug
Components: executable model
Reporter: Mario Fusco
Assignee: Mario Fusco
Priority: Major
Labels: support
Attachments: reproducer_model_compiler_5a.zip
Executing a rule like (\*1) that uses {{action()}} accumulate function in which calls a
method like (\*1-1) in executable model, the order of parameters passed to the method is
unexpectedly changed and the parameters are not passed correctly. For example of the rule
(\*1-1), {{$a.method(map, $bList, $cList, $dList)}} is actually called as {{$a.method(map,
$cList, $aList, $bList)}}.
(\*1)
{noformat}
package com.example.reproducer
import java.util.List
import java.util.Set
import java.util.Map
import java.util.HashMap
dialect "java"
rule "rule5a"
when
$aList : List() from collect( A() )
$bList : List() from collect( B() )
$cList : List() from collect( C() )
$dList : List() from collect( D() )
$eSet : Set() from accumulate( $a : A() from $aList,
init( Map map = new HashMap(); ),
action( $a.method(map, $bList, $cList, $dList); ),
// ..... (*1-1)
result( map.keySet() ) )
then
System.out.println("***** Action of \"rule5a\" -- $aList = "
+ $aList + ", $bList = " + $bList + ", $cList = " + $cList + ",
$dList = " + $dList + ", $eSet = " + $eSet);
end
{noformat}