On Thu, Jan 7, 2010 at 10:40 AM, yaog <[email protected]> wrote: > > Hi, > > I want to test out filters. I have this route: > > <route id="route1"> > > <from uri="direct:start" /> > <to uri="bean:compAImpl" /> > > <camel:setHeader > headerName="goto"><camel:constant>B</camel:constant></camel:setHeader> > > <camel:choice> > > <when> > <camel:simple>in.header.goto='B'</camel:simple> > <to uri="bean:compBImpl" /> > </when> > > <otherwise> > <to uri="bean:compCImpl" /> > </otherwise> > > </camel:choice> > </route> > > It is not working. only C is invoked.
The simple languages support a limited set of operators as listed here http://camel.apache.org/simple.html The eq is using double = so you should use == instead of only a single = And you need ${ } around the header. Just check the simple documentation page as there are plenty of examples. > > What is wrong? > -- > View this message in context: > http://old.nabble.com/correct-use-of-choice-tp27057257p27057257.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
