It is not ideal, but you can achieve the same if you reorganize your route
as following

<route>
            <from uri="direct:a"/>

            <filter>
                <xpath>$foo1 = 'bar'</xpath>
                <filter>
                    <xpath>$foo2 = 'bar'</xpath>
                    <filter>
                        <xpath>$foo3 = 'bar'</xpath>
                        <to uri="direct:b"/>
                        <stop/>
                    </filter>
                </filter>
            </filter>

            <filter>
                <xpath>$foo1 = 'cheese'</xpath>
                <filter>
                    <xpath>$foo2 = 'cheese'</xpath>
                    <filter>
                        <xpath>$foo3 = 'cheese'</xpath>
                        <to uri="direct:c"/>
                        <stop/>
                    </filter>
                </filter>
            </filter>
            <to uri="direct:d"/>
        </route>

HTH


On Tue, Nov 26, 2013 at 3:26 PM, fliot33 <francois.l...@poplidays.com>wrote:

> Hi,
>
> As per http://camel.apache.org/message-router.html
>
> How could I do something like that :
>
>     <route>
>         <from uri="direct:a"/>
>         <choice>
>             <when>
>                 <allTestsShouldBeTrue>
>                    <xpath>$foo1 = 'bar'</xpath>
>                    <xpath>$foo2 = 'bar'</xpath>
>                    <xpath>$foo3 = 'bar'</xpath>
>                 </allTestsShouldBeTrue>
>                 <to uri="direct:b"/>
>             </when>
>             <when>
>                 <allTestsShouldBeTrue>
>                    <xpath>$foo1 = 'cheese'</xpath>
>                    <xpath>$foo2 = 'cheese'</xpath>
>                    <xpath>$foo3 = 'cheese'</xpath>
>                 </allTestsShouldBeTrue>
>                 <to uri="direct:c"/>
>             </when>
>             <otherwise>
>                 <to uri="direct:d"/>
>             </otherwise>
>         </choice>
>     </route>
>
> Thanks in advance,
> Regards.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Message-router-multiple-values-tp5743857.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Bilgin Ibryam

Apache Camel & Apache OFBiz committer
Blog: ofbizian.com
Twitter: @bibryam <https://twitter.com/bibryam>

Author of Instant Apache Camel Message Routing
http://www.amazon.com/dp/1783283475

Reply via email to