camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boday <ben.o...@initekconsulting.com>
Subject Re: Accessing a local declared hashmap variable in a route
Date Mon, 15 Jul 2013 04:35:22 GMT
you can use camel-simple to do this...

from("direct:start")
      .choice()
             .when().simple("${body.keySet} contains 'foo'")
                    .to("mock:king")
             .otherwise()
                    .to("mock:other");


clipod wrote
> Hi, 
> I have a camel route with a choice block. I want to use a hashmap inside a
> when condition. 
> To be more precise I would like to know if there is a way to use the
> "containsKey" function inside when.
> Is there a way to handle this. I can actually create a processor and
> define the behaviour but I would like to do it in the route itself.





-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: http://camel.465427.n5.nabble.com/Accessing-a-local-declared-hashmap-variable-in-a-route-tp5735553p5735646.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message