[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
Wed Aug 3 10:00:05 EDT 2016
[ https://issues.jboss.org/browse/DROOLS-1245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274565#comment-13274565 ]
Matteo Mortari commented on DROOLS-1245:
----------------------------------------
Changed the main description to reflect latest changes (compile-time check also when accumulate function returns an iterable/collection).
> 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
>
> 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