On Tue, Jun 17, 2014 at 12:39 PM, moerty <moe...@seznam.cz> wrote: > Hi, > I have probably found a bug in Simple language evaluator. First let's have a > Camel message and with a new exchange property called KEY with some random > value such as 12345. Then in my Camel spring route I have this kind of > expression inside <choice><when> etc. > > <simple>${property.KEY} == 12345</simple> > > and this kind of a expression > > <simple>${header.KEY} == 12345</simple> > > Now, from what I have understood so far is that 1. expression should > evaluate as true since at the beginning I set up the exchange property and > 2. expression as false as it wants to access IN message header in the > exchange. But actually this is not happening as both expressions are in fact > returning true. > > I have checked the message headers and exchange properties and the KEY is > set only in the property, so ${header.KEY} is for some reason accessing also > the exchange property. > > Currently I am using 2.12.0 and the question is whether is this desired > behavior or a bug? >
This is working as Camel was designed with the header/property expressions in the DSL. A header lookup will fallback as property. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Simple-message-header-XXX-and-exchange-property-XXX-the-same-tp5752420.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 hawtio: http://hawt.io/ fabric8: http://fabric8.io/