Hi The filter simple predicate is wrong
> .filter(simple("{body[isCredit]} == true")) See syntax on the simple docs, eg use ${ } as the tokens. On Tue, Oct 8, 2013 at 8:49 AM, prabumc...@gmail.com <prabumc...@gmail.com> wrote: > Hi All, > > I am having added below code in my camel routing,but it not work at all. > > I want to use when and filter both for my routing > > from(ACT_TYPE_SPECFIC_QNAME).choice() > .when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION)) > .filter(simple("{body[isCredit]} == true")) > .process(new Processor() { > public void process(Exchange exchange) { > Map map = (Map) exchange.getIn().getBody(); > String Account_No = (String) map.get(ACCOUNT_ID); > Map<String,Object> newBody = new HashMap<String, Object>(); > newBody.put(ACCOUNT_ID, Account_No); > exchange.getIn().setBody(newBody); > }}).to(ACTIVATE_QNAME).endChoice() > .otherwise() > .setHeader(DESTINATION, constant(DESTINATION_VALUE)) > .to(EROOR_QNAME) > .end(); > > I also added .endChoice() like you suggest...but ti didn't work pls kindly > help me. > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/using-filter-inside-when-tp5652300p5741081.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