I have a job step that reads from the database and writes the output to a flat file and creates a report.
If the step fails I want it to do the restart, processing all over from the top. I don’t want to incorporate any recovery into this step.
What is the best way to implement Spring Batch so this tasklet doesn’t perform any chunk processing and trigger recovery during the middle of the process?
Mark job as restartable="true"
.
Mark step as allow-start-if-complete="true"
.
Intercept step execution and mark step as COMPLETED also on failure.
When you restart the job your step will be executed from start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With