[ 
https://issues.apache.org/jira/browse/CAMEL-7167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-7167:
-------------------------------

    Fix Version/s: 2.13.0
                   2.12.3

Thanks for reporting. Yeah the onCompletion was currently only in use with the 
aggregate eip. Should do the same for split and the others as well.

> AbstractListAggregationStrategy : at the end of the split, the body is not 
> replaced by the agregated list
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-7167
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7167
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.1
>            Reporter: Yves De Moor
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.12.3, 2.13.0
>
>
> Using a class that extends AbstractListAggregationStrategy to rebuild a List 
> after the completion of the split cause the body not to be replaced by the 
> agregated list at the end of the split.
> In other words (AbstractListAggregationStrategy.onCompletion(Exchange 
> exchange) is never called.
> Here is what I do :
> from(HANDLE_A_LIST)//
>             .split(body(), new ListAggregationStrategy())// body is an 
> arrayList of String
>             .to("log:foo")//
>             .end()// end split
>             // the body is a string instead of a List
>             .end()// end route
>    
> class ListAggregationStrategy extends AbstractListAggregationStrategy<String>
>     {
>         @Override
>         public String getValue(Exchange exchange)
>         {
>             return exchange.getIn().getBody();
>         }
>     }
> As workaround, I use .setBody(property(Exchange.GROUPED_EXCHANGE)) after the 
> end of the split.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to