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.meht...@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: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen