camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine DESSAIGNE <antoine.dessai...@gmail.com>
Subject Re: Possibility of jdbc component when performing a select to return a map
Date Mon, 23 Mar 2015 09:56:35 GMT
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.rlcosta@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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message