]
Tibor Zimányi updated DROOLS-1468:
----------------------------------
Labels: oopath (was: )
Support OOPath in accumulate functions
--------------------------------------
Key: DROOLS-1468
URL:
https://issues.jboss.org/browse/DROOLS-1468
Project: Drools
Issue Type: Feature Request
Components: core engine
Affects Versions: 7.0.0.Beta7
Reporter: Tibor Zimányi
Assignee: Mario Fusco
Priority: Minor
Labels: oopath
It would be nice to have the ability to use OOPath in accumulate functions. E.g.
_sum(/fact/property)_.
Example of a rule:
import org.drools.compiler.oopath.*;
global java.lang.Object globalVar
rule R when
accumulate ( Adult() ; $accumulateResult: sum(/children/age) )
then
kcontext.getKieRuntime().setGlobal(\"globalVar\", $accumulateResult);
end