If any files are found, the processor and choice condition will be executed, so 
could the fileProcessor be messing with the headers?

Also, believe with this configuration that Camel will only set the 
CamelBatchComplete header to true on the last file it found during the last 
poll - is that what you’re after?

> On Aug 12, 2016, at 6:09 AM, JSmith <js3685...@gmail.com> wrote:
> 
> Hey all,
> 
> So I have a block of code set up in Spring that goes like:
> 
>               <route customId="true" id="fileRoute">
>                       <from uri="{{ftp.route}}&amp;filter=#FileFilter" />
>                       
>                       <process ref="fileProcessor" />
>                       
>                       <choice>
>                               <when>
>                                       <simple>${headers.CamelBatchComplete} 
> == true </simple>
>                                       <bean ref="FileFilter" 
> method="setTime"/>
>                               </when>
>                       </choice>
>                       <to uri="{{ftp.end.route}}"/>
>               </route>
> 
> 
> During the initial polling, a handful of files will be found but after the
> Processor they all get dropped.  That breaks the block because the
> CamelBatchComplete is set on the last Exchange, but there are no Exchanges
> making it through (right?).
> 
> What could I do to trigger that "setTime" method?
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Triggering-choice-when-block-when-no-Exchanges-make-it-through-tp5786357.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to