Using ExecutionContext in batch job XML
Values stored in the Job’s ExecutionContext can be used throughout the entire batch Job, while values stored in the Step’s ExecutionContext can be used only within that Step.
-
Using Job ExecutionContext: #{jobExecutionContext[key]}
-
Using Step ExecutionContext: #{stepExecutionContext[key]}
<bean id="RBMdpCustDataFiletoFile100" parent="RDelimit" scope="step">
<property name="resource" value="file:///datafiles/bxm/dat/#{jobExecutionContext[inputFile]}" />
<property name="encoding" value="UTF-8" />
<property name="delimiter" value=";" />
<property name="targetType" value="bxm.dft.smp.batch.bean.dto.MSmpDelimitedToDBBtch01Dto" />
</bean>
<bean id="WBMdpCustDataFiletoFile100" parent="WDelimit" scope="step">
<property name="resource" value="file:///datafiles/bxm/dat/#{stepExecutionContext[outputFile]}" />
<property name="encoding" value="UTF-8" />
<property name="delimiter" value=";" />
<property name="targetType" value="bxm.dft.smp.batch.bean.dto.MSmpFixedToDelimitedBtch01Dto" />
</bean>