camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel: when() with boolean parameter
Date Mon, 30 Sep 2013 10:22:00 GMT
There is a PredicateBuilder where you can build these kind of predicates.

See for example
http://www.davsclaus.com/2009/02/apache-camel-and-using-compound.html

On Mon, Sep 30, 2013 at 12:13 PM, smehta34 <sachin.mehta15@gmail.com> wrote:
> Hi,
>
> I have two Strings which I have to check in choice(). If both equals then
> route to an endpoint else route to different endpoint. I am stuck as when()
> accepts only predicates and I am comparing two strings with equals() method
> which returns boolean value. How should I proceed? Any help will be helpful
> for me.
>
> Sample route:
> -------------
> String isValid = "Y";
>
> .choice()
> .when(isValid.equals("Y")).to(seda:\\)
> .when(isValid.equals("N")).to(seda:\\)
> .end();
>
> Regards,
> Sachin
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-when-with-boolean-parameter-tp5740480.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message