I do have a problem with combining Spring Integration & Batch. I am enriching header in chain with an url and id, then the file is being downloaded from ftp and parsed using batch - that's ok. Problem is that I cannot copy header values in the writer after executing job.
<int:gateway service-interface="org.springframework.batch.item.ItemWriter" id="writer"
default-request-timeout="1000" default-request-channel="dataChannel"
default-reply-channel="replyChannel">
<int:method name="write">
<int:header name="id" expression="headers['id']" />
<int:header name="url" expression="headers['url']" />
</int:method>
</int:gateway>
Also I tried to use jobParameters, but it is not possible to invoke them there..
What should my approach be?