This content has been marked as final.
Show 2 replies
-
1. Re: Loop in a CAMEL route
davsclaus Jan 17, 2012 11:14 AM (in response to mpalvankar)There is a Dynamic Router you can use. It can route to an endpoint, an it will re-evaluate an expression each time. Mind that you need to return null for the expression, when you are done.
http://fusesource.com/docs/router/2.8/eip/_IDU_DynamicRouter.html
And btw we will possible in the future look at making the loop be like a while loop instead. But for now its a fixed for loop.
-
2. Re: Loop in a CAMEL route
timgstewart Feb 3, 2012 4:06 PM (in response to mpalvankar)I did something similar with this by splitting the incoming XML on an XPath to make multiple messages, then passing those individual messages onto another route that does something to each one:
from("direct:splitReports").split(xpath("/*//report")).to("direct:handleReport");
from("direct:handleReport")......