Hi Angelo,

First in groovy you don't need to explicitly call the 'get' method on Maps.
Second, you'll have to use the exchange in order to access properties in
groovy.

Here what you need to do :
<groovy>request.body[exchange.properties['currentCode']]</groovy>

Have a nice day,

Antoine.

2015-03-17 16:53 GMT+01:00 angelo.rlcosta <angelo.rlco...@gmail.com>:

> Hello again Antoine,
>
> The previous groovy expression worked well. Thanks.
>
> How can i pass camel property inside groovy context.
>
> For example if i define a property
> <setProperty propertyName="currentCode">
>                 <simple>100</simple>
>             </setProperty>
>
> How can i use this property inside groovy something like
> <setProperty propertyName="errorFound">
>                 <groovy>request.body.get("100")</groovy>
>             </setProperty>
>
> So instead of request.body.get("100") i want something like
> request.body.get(${property.currentCode})
>
> Thanks in advance,
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Possibility-of-jdbc-component-when-performing-a-select-to-return-a-map-tp5764228p5764287.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to