You can use beanshell language to achieve the same result.

Ensure that you have h_event and h_state present in the headers with some 
values otherwise NPE will be thrown.

                        <filter>
                            <language language="beanshell"> ( 
request.getHeaders().get("h_event").equals("A") &amp;&amp; 
request.getHeaders().get("h_state").equals("AA") ) || 
(request.getHeaders().get("h_event").equals("B") &amp;&amp; 
request.getHeaders().get("h_state").equals("BB") )  </language>
                            <log message="${in.body}" />  // Do whatever you 
want to do here
                        </filter>



-Ravi


-----Original Message-----
From: bonnahu [mailto:[email protected]]
Sent: Friday, March 28, 2014 2:36 AM
To: [email protected]
Subject: Does simple expression support operator precedence by using 
parenthesis or bracket?

hey guys, does anyone know if the simple expression support operator precedence 
by using parenthesis?
Basically, I want to do something like this:

                <simple>(${in.headers.h_event} == 'A' and
                         ${in.headers.h_state} == 'AA')
                         or
                         (${in.headers.h_event} == 'B'
                         and ${in.headers.h_state} == 'BB' )
                 </simple>



--
View this message in context: 
http://camel.465427.n5.nabble.com/Does-simple-expression-support-operator-precedence-by-using-parenthesis-or-bracket-tp5749448.html
Sent from the Camel - Users mailing list archive at Nabble.com.
This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.

Reply via email to