When a job consists of multiple steps ,it may be necessary to pass information between the steps. Each Step has a StepExecutionContext but this exists only for the span of the step. To make the data available to future Steps, it will have to be passed to the Job ExecutionContext after the step has finished. Spring Batch provides the ExecutionContextPromotionListener for this purpose. The listener must be configured with the keys related to the data in the ExecutionContext that must be promoted and must be registered with the Step.
The sample of Job with multiple steps

Here is my xml content from jobConfig.xml,
ReplyDeleteWhen I run the test, I get the error saying "The element [processFile2Step] is unreachable"
when I switched the steps, it complains about
"The element [emailStep] is unreachable"
Any thoughts ???
Somehow not taking XML here.
ReplyDeleteI have 2 different steps, it always complains about second one not reachable.
your image is not visible here.. better to post a sample project. That would really help!
ReplyDelete