Q:

Flow not exiting like expected

new to SI. I have this SI Flow below. I would expect the Java program to exit when done, after the outbound channel, but it continues waiting, and I'm confused as to why. Thanks in advance!
<int-file:inbound-channel-adapter id="filesIn" 
directory="file:${com.cld.creditexpenses.inputdirectory}" 
    filename-pattern="*.313" auto-startup="true">
    <int:poller id="poller" fixed-delay="10000"/>
 </int-file:inbound-channel-adapter>   
      <int:service-activator  input-channel="filesIn" ref="delimitedFileProcessor" 
  method="processFile" output-channel="outChannel" />
        <int:outbound-channel-adapter id="outChannel" ref="fileArchiver" method="archiveFile" >
  </int:outbound-channel-adapter>

A:

You have to close the application context when processing is complete, or replace the default taskScheduler with one that uses daemon threads - see the documentation.
But doing that means the program may exit before processing is complete - so you need to keep it running some other way.

