Hi Joe,

take a look at
http://camel.apache.org/splitter.html#Splitter-Splitaggregaterequest%2Freplysample
,
after you end() your split do a wireTap to the second long running task.
(assuming the exchange pattern is InOut)

Cheers,
Henrique

Henrique Viecili


2013/10/17 Joe Osowski <joe.osow...@gmail.com>

> Dear Camel users.
>
> Given the following DSL.  What would be the best way to execute a task
> when all the below processing is complete?
>
> Specifically, I have a second long running task that needs to get
> queued as soon as  FOO2_QUEUE is complete.
>
>     from(FOO_QUEUE)
>       .to("bean:service?method=getFoo(${body})")
>       .process(new Processor() {
>         @Override
>         public void process(Exchange exchange) throws Exception {
>           //All we care about is the citedArticle IDs list
>           List<Long> ids = exchange.getIn().getBody(Foo.class).getIDs();
>           exchange.getOut().setBody(ids);
>         }
>       })
>       .split().body() //Create a job for each ID
>       .to(FOO2_QUEUE)
>
>     from(FOO2_QUEUE)
>       .to("bean:service?method=foo");
>

Reply via email to