I am trying to stop a job using a custom exit status set in a step execution listener. However, the job does not stop as expected. The job continues to execute step2 even though the step execution exit code is reported as "STOPPED_FOR_PAUSE".
Can anyone point me to what I am doing wrong? This looks like it should work based on the docs.
Thanks,
Alejandro
Code:<job id="job2" xmlns="http://www.springframework.org/schema/batch" restartable="true"> <step id="step1" > <tasklet ref="tasklet1" transaction-manager="transactionManager"> <batch:listeners> <batch:listener class="StepExecListener" /> </batch:listeners> </tasklet> <batch:stop on="STOPPED_FOR_PAUSE" restart="step2"/> </step> <step id="step2"> <tasklet ref="tasklet2" transaction-manager="transactionManager"> </tasklet> </step> </job>


Reply With Quote