[jboss-jira] [JBoss JIRA] (DROOLS-1245) Document limitation of (legacy) Accumulate CE Alternate Syntax: single function with return type
Matteo Mortari (JIRA)
issues at jboss.org
Fri Sep 2 03:20:00 EDT 2016
[ https://issues.jboss.org/browse/DROOLS-1245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matteo Mortari closed DROOLS-1245.
----------------------------------
Fix Version/s: 6.5.0.Final
7.0.0.Final
Resolution: Done
Fixed by https://github.com/droolsjbpm/kie-docs/commit/ab6d708b9d7b6b4a5e745aa241e7d6e2c2b9a6ae
Cherry picked on 6.5.x by https://github.com/droolsjbpm/kie-docs/commit/e6aac3cf1440ebd7afb39bd52fd670d5296bd666
> Document limitation of (legacy) Accumulate CE Alternate Syntax: single function with return type
> ------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1245
> URL: https://issues.jboss.org/browse/DROOLS-1245
> Project: Drools
> Issue Type: Enhancement
> Components: docs
> Affects Versions: 6.4.0.Final
> Reporter: Matteo Mortari
> Assignee: Matteo Mortari
> Fix For: 6.5.0.Final, 7.0.0.Final
>
>
> Document limitations and common pitfalls:
> h2. from+accumulate does not iterate
> This does NOT iterate over the elements of the accumulate function:
> {code:java}
> rule R when
> $theFrom : Object() from accumulate(MyPerson( $val : name );
> collectList( $val ) )
> then
> list.add($theFrom);
> end
> {code}
> and in fact the binded $theFrom : Object() is the List returned by the collect list.
> While normally the "from" iterates over the element of list/iterable collections.
> {code:java}
> rule R1 when
> $list : List( )
> $s : Integer() from $list
> then
> out.add($s);
> end
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list