You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gary Liu <Ga...@gmail.com> on 2012/07/16 20:11:38 UTC

Compound Predicate For Camel Route

Hello,
I need to put "AND" log into my spring based xml.
Here is the snappit:

            <when>
              <description>Transaction Imports</description>
              <simple>${in.header.CamelHttpPath} contains
'/trans/Inventory/'</simple>
             AND
             <simple>${in.header.CamelHttpMethod} != 'DELETE'</simple>
              
              <log
                message="Validating [Trans Inventory Import] web request
xml." />
              <to uri="validator:com/xyzcomp/ws/rs/validation/inventory.xsd"
/>
            </when>

My question is:

How to use "AND" here?

Thanks,
--Gary

--
View this message in context: http://camel.465427.n5.nabble.com/Compound-Predicate-For-Camel-Route-tp5716112.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Compound Predicate For Camel Route

Posted by Gary Liu <Ga...@gmail.com>.
Thanks Claus. It works. As we are using 2.8 Camel, I use "and" like this:

<simple>${in.header.CamelHttpMethod} != 'DELETE' and
${in.header.CamelHttpPath} contains '/trans/WorkOrder'</simple>

Thanks
--Gary

--
View this message in context: http://camel.465427.n5.nabble.com/Compound-Predicate-For-Camel-Route-tp5716112p5716135.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Compound Predicate For Camel Route

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See the documentation, at the section _Operator support_ onwards
http://camel.apache.org/simple



On Mon, Jul 16, 2012 at 8:11 PM, Gary Liu <Ga...@gmail.com> wrote:
> Hello,
> I need to put "AND" log into my spring based xml.
> Here is the snappit:
>
>             <when>
>               <description>Transaction Imports</description>
>               <simple>${in.header.CamelHttpPath} contains
> '/trans/Inventory/'</simple>
>              AND
>              <simple>${in.header.CamelHttpMethod} != 'DELETE'</simple>
>
>               <log
>                 message="Validating [Trans Inventory Import] web request
> xml." />
>               <to uri="validator:com/xyzcomp/ws/rs/validation/inventory.xsd"
> />
>             </when>
>
> My question is:
>
> How to use "AND" here?
>
> Thanks,
> --Gary
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Compound-Predicate-For-Camel-Route-tp5716112.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen