title: How to put resourse name in FlatFileItemWriter dynamically
body: <p>I want to add the resource name dynamically in the ItemWriter, A prefix of the name comes from the stored procedure called in the ItemReader.
  On each read the value will be different so that it will automatically create a different file.
  Here is the snippet:- </p>
  
  <pre><code>&lt;bean id="achFlatFileWriter" class="org.springframework.batch.item.file.FlatFileItemWriter"
          scope="step"&gt;
          &lt;property name="resource" value="#{jobParameters['settlementTimestamp']}**#{VALUE_FROM_READER}**.MPS.txt" /&gt;
          &lt;property name="shouldDeleteIfExists" value="true" /&gt;
          &lt;property name="lineAggregator"&gt;
              &lt;bean
                  class="org.springframework.batch.item.file.transform.FormatterLineAggregator"&gt;
                  &lt;property name="fieldExtractor"&gt;
                      &lt;bean
                          class="org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor"&gt;
                          &lt;property name="names" value="writeToFile" /&gt;
                      &lt;/bean&gt;
                  &lt;/property&gt;
                  &lt;property name="format" value="%s" /&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
  
      &lt;/bean&gt;
  </code></pre>
  
  <p>Here VALUE_FROM_READER will come from reader,
  I tried by adding the value to the job context through listeners, It is not helpful . Any approach will be appreciated. </p>