0 Replies - 530 Views - Last Post: 18 June 2012 - 07:24 AM Rate Topic: -----

#1 Luckless  Icon User is offline

  • </luck>
  • member icon

Reputation: 292
  • View blog
  • Posts: 1,146
  • Joined: 31-August 09

Camel in Spring DSL: Groovy Expressions

Posted 18 June 2012 - 07:24 AM

So I'm using Camel, Spring, and Groovy for a project. I have a route set up in Camel that branches depending on a message's body content. Say I have a type of inquiry called order inquiry. I've parse the xml order and taken the value of <requestType> and <orderType> and saved them in a Groovy javabean as requstType and orderType. how do I look at both of the variables in an if statement?

<camel:when>
    <camel:groovy>(request.body.requestType.equals("STATUS") && request.body.orderType.equals("INQSLND"))</camel:groovy>
    <to uri="activemq:queue:orderInquiry?transferException=true"/>
    <stop/>
</camel:when>



I have three other inquires that have unique suborder types that work fine but this type of inquiry is formatted differently so I have to look at more than one value. the && is the question. Any ideas? Google had no answers for me

Is This A Good Question/Topic? 0
  • +

Page 1 of 1