I am trying to use a custom predicate inside of a choice in Spring XML, but
I'm finding my predicate is always being treated as "false" - the bean
itself does not seem to be called.

            <choice>
                <when>&lt;!-- TODO: figure out why this never is evaluated
-->
                    <method ref="openCNPredicate" method="matches"/>
                    <to uri="file:/srv/tritech/data/closedcns"/>
                </when>
                <otherwise>
                    <to uri="file:/srv/tritech/data/foqtemp"/>
                </otherwise>
            </choice>

I've added debugging to my openCNPredicate bean, but I never see it turn up
in the log (all other debug messages do).  I only added the
'method="matches"' part after I found it was not being evaluated.

Can you not use "method" inside of "when"?  I see a lot of documentation
using it inside of "<filter>", but not inside the "<when>".

Thanks for the assistance,

 - Pete



--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-method-inside-a-choice-when-tp5795092.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to