camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From damianharvey <damianharvey+ca...@gmail.com>
Subject Re: RecipientList repeating parent body
Date Tue, 16 Nov 2010 22:05:35 GMT

Hi Claus, Thanks for answering.

I have a route/flow that calls a specific OS command to retrieve some XML
(it's from a COBOL script). It is required to be called on it's own with a
single Client or with a list of Clients.

The main route (as per original post but with the response endpoint logic) : 

from("seda:start")
.log("******* Started single body : ${body}")
.recipientList(simple("exec:GetClaimList${header.osCmdSuffix}?useStderrOnEmptyStdout=true&args=${body.client}"))
.log("******* Executed OS cmd and received: ${body}")
.choice()
	.when(simple("${header.responseNode} == null"))
		.to("seda:finish")
	.otherwise()
		.recipientList(simple("${header.responseNode}"));

The "parent" route called with a list of Clients:

from("seda:multiStart")
.setHeader("responseNode", constant("seda:multiReply"))
.setHeader("UUID", BeanLanguage.bean(UUIDFactory.class, "generate"))
.split(body())
	.parallelProcessing()
	.to("seda:start");

And the route used to aggregate:

from("seda:multiReply")
.aggregate(header("UUID"), new ListAggregationStrategy())
.completionSize(header(Exchange.SPLIT_SIZE))
.to("seda:multiResponse");

Thanks,

Damian.

-- 
View this message in context: http://camel.465427.n5.nabble.com/RecipientList-repeating-parent-body-tp3266855p3268175.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message