I generate a message, set header 'a' to value 'aa' and than do a check "in.headers['a'] == 'aa'" and this check is false because message is routed to "mock:false" queue. I would expect it to go to "mock:true" destination.
On Sun, Oct 5, 2008 at 11:47 PM, Claus Ibsen <[EMAIL PROTECTED]> wrote: > Hi Vadim > > Sorry I don't get it. Could you elaborate what you see and what is missing? > > > Med venlig hilsen > > Claus Ibsen > ...................................... > Silverbullet > Skovsgårdsvænget 21 > 8362 Hørning > Tlf. +45 2962 7576 > Web: www.silverbullet.dk > -----Original Message----- > From: Vadim Chekan [mailto:[EMAIL PROTECTED] > Sent: 6. oktober 2008 08:41 > To: [email protected] > Subject: Choice operator > > Folks, > Do you know what I'm missing here? > > from("timer://kickoff_5?period=10000"). > setHeader("a").constant("aa").setBody().constant("bbb"). > choice().when().el("in.headers['a'] == 'aa'").to("mock:true"). > otherwise().to("mock:false"); > > > I see in the trace that the message on the choise input has required > headers: > > 2008-10-06 06:37:04,418 [_5?period=10000] INFO TraceInterceptor > - ID-ubuntu/52774-1223275024293/2-0 -> choice1 Choice[ [When[ > elExpression[in.headers['a'] == 'aa'] -> [To[mock:true]]]] > Otherwise[[To[mock:false]]]] InOnly > Properties:{org.apache.camel.timer.name=kickoff_5, > org.apache.camel.timer.firedTime=Mon Oct 06 06:37:04 GMT 2008, > org.apache.camel.timer.period=10000} Headers:{a=aa, firedTime=Mon Oct 06 > 06:37:04 GMT 2008} BodyType:String Body:bbb > > Vadim. > -- >From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT is explicitly specified
