In Camel 2.8 or older you have to be more careful when using simple language. The parser was re-written for 2.9 onwards. For example you should not have the ("xxx") around the entire simple expression.
And try with 1 expression first, and make sure that works. Then you can add the " and ...". And only have exactly 1 space around the operator. On Wed, Dec 12, 2012 at 7:16 AM, mail2bansi <mail2ba...@gmail.com> wrote: > Thanks everyone for responding. But still it doesnt work. I am not sure if > the below expression is evaluated as it always call the route under first > expression even thought its false > > Here is an example: > <choice> > <when> > <simple>("${property.noun} contains 'Hello' and > ${property.verb} contains 'World'") </simple> > > > <to uri="direct://HelloWorldRequestStart"/> > </when> > > <when> > <simple>("${property.noun} contains 'Hello' and > ${property.verb} contains 'Camel'") </simple> > > <to uri="direct://HelloCamelRequestStart"/> > > </when> > </choice> > > The Exchange property sets the following attributes: > noun: Hello > verb: camel > > But it always calls <to uri="direct://HelloWorldRequestStart"/> instead of > <to uri="direct://HelloCamelRequestStart"/> > Not sure where i am going wrong > > Regards, > Bansi > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Simple-Expression-With-And-Condition-doesnt-work-in-Camel-2-8-tp5723702p5723935.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen