Hello,

Set appropriate headers using .header("type",constant("good/bad"))
Then use the conditional operators to route accordingly..Something like.
.choice().when(header("type").isequalto("good")).to("direct:
good").otherwise().to("direct:bad").end();

Best
Souciance

On Wed, Nov 30, 2016 at 3:25 PM, spurcell [via Camel] <
ml-node+s465427n5790803...@n5.nabble.com> wrote:

> In a project I am working on, I am parsing a large excel file, and during
> the routing, I am performing some validation on the data. I have a route
> that performs the validation, and if validation is good, I want to continue
> down the same routes that exist. But if the data is invalid, I want to pass
> it to a different route to process and handle database writes there.
>
> I have went through all the EIP patterns, but do not see one that performs
> what I call a sift, where the good ones go down one path and the bad ones
> go down a different path.
>
> Can someone assist with possible work arounds for this?
>
> Thanks
> Scott
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Route-to-two-paths-tp5790803.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Route-to-two-paths-tp5790803p5790807.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to