This sounds like a job for the dynamic router pattern, it's kind of like a smart loop that lets you decide what to do next based on the current state of the exchange. Depending on the last file to be loaded, you route to a subroute that consumes from the next file.
https://camel.apache.org/dynamic-router.html The main route that invokes the dynamic router should only consume activity.xml files - which are your trigger to start the process. Jakub On 09/02/15 15:52, carlrivers wrote: > I have a situation where an external system will send me 4 different files at > the same time. Let's call them the following:- customers.xml (optional)- > addresses.xml (optional)- references.xml (optional)- activity.xml (trigger > file)When the trigger file is sent and picked up by Camel, Camel should then > look to see if file #1 exists, if it does then process it; if it doesn't > then move on to file #2 and file #3 applying the same if/then logic. Once > that logic has been performed, then it can proceed with file #4.I found > elements like OnCompletion and determining if body is null or not but if > someone has a much better idea, I would greatly appreciate it. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-do-I-configure-Apache-Camel-to-sequentially-execute-processes-based-on-a-trigger-file-tp5762509.html > Sent from the Camel - Users mailing list archive at Nabble.com.