Hi I have below like xml for executing Job
<batch:job id="Job1" restartable="false" xmlns="http://www.springframework.org/schema/batch"> <step id="step1" next="step2"> <tasklet ref="automate" /> </step> <step id="step2"> <tasklet ref="drive" /> <next on="COMPLETED" to="step3"></next> </step> <step id="step3"> <tasklet ref="generate_file" /> </step> </batch:job>
For this I have write a tasklet to execute a script. Now I want that if script execution failed three times then next step will not execute . But from Tasklet I am able to return only Finished which move the flow to next step and continuable which continue the process. What should I do in this.
Best Answer
you can write your own decider to decide wheather to goto next step or to end the job. if you are able to handle the failures you can also handle the flow of a job
config is
class is