You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2014/02/05 12:00:10 UTC
[jira] [Assigned] (CAMEL-7167) AbstractListAggregationStrategy : at
the end of the split, the body is not replaced by the agregated list
[ https://issues.apache.org/jira/browse/CAMEL-7167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-7167:
----------------------------------
Assignee: Claus Ibsen
> 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
>
> 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)