On Thu, Feb 7, 2013 at 12:06 PM, justinblandford <[email protected]> wrote: > Hi, > > I have a blueprint property such as :- > > <cm:property-placeholder> > <cm:default-properties> > <cm:property name="test.property" value="" /> > > and have a route like :- > > <route id="test" > > <from uri="test.."/> > <choice> > <when> > <simple>{{test.property}} == ''</simple> > do something.. > otherwise do something else > > > However when I run the route I get the error:- > org.apache.camel.language.simple.types.SimpleIllegalSyntaxException: > Unexpected token { at location 0 > > I've also tried ${test.property} but that doesn't work either. Does anyone > have any idea on how to use this blueprint property in the scenario above? > The test.property may potentially have a value as it can be overriden > externally and I want some conditional processing based on that. I'm using > Camel 2.10.0. >
Ah yeah you may need to upgrade Camel. There was an issue in older releases where the property placeholders in the expressions/predicates in the routes was not resolved. A workaround is to use a simple function to refer to the property. eg the properties function as shown here: http://camel.apache.org/simple <simple>${properties:test.property} == ""</simple> > Regards, > > Justin > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-do-you-use-a-blueprint-property-to-control-a-Simple-expression-tp5727101.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
