Hi Not using simple.
You can take a look at more powerful languages like groovy which you can use from Camel, or just write 5-10 lines of java code and call that java method from Camel. On Mon, Aug 11, 2014 at 7:34 PM, sandp <[email protected]> wrote: > > Hi, > A nested ObjectB contains a list of nested Objects that contain an object of > type ObjectC > Where ObjectC, has a couple of fields below: > String str1; > String str2; > long litem1; > int int item1; > > > *I'm trying to check the value of field str2 for every ObjectC in > List<ObjectC> in a camel route* > > > *Route* > from("tibjms:QUEUE_NAME").choice() > .when(simple("${in.body?.getTRANSACTION?.getEVENT} in > ${properties:app.bridge.some.action.event} " > *+ " && > ${in.body?.getObjectB?.getNestedObjects?.getObjectCs[last]?.getStr2}"* > + " contains ${properties:app.bridge.some.action.application.str2}")) > .process(new CamelTibcoMessageProcessor()).end(); > > > As per the Simple Expression documentation > <http://camel.apache.org/simple.html> , I understand that an element in a > list can be accessed by index or by last, last -1 and so on... > > *My question is : *Is it possible to dynamically iterate the whole list in > the route and check for the value str2 for each ObjectC in List<ObjectC> > something like foreach?? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-Restlet-2-13-1-Simple-Expression-for-all-objects-in-a-List-tp5755059.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
