Description
Bug description
If i configure a restartable job as a flow job, and during a step it fails with an error, once i restart it the job resume from the next step,
terminating succesfully in case of single step jobs, and not retrying from the failed step
if the job is configured as SimpleJob, it works as expected
Environment
java 11
spring batch 4.3.7
Steps to reproduce
Steps to reproduce the issue.
configure a single step job like so:
@Bean
public Job job(Step failingStep) {
return this.jobBuilderFactory.get("job")
.incrementer(new RunIdIncrementer())
.flow(failingStep)
.end()
.build();
}
where failingStep is bound to throw an exception somewhere, thus completing the job as FAILED
Expected behavior
upon restarting of the job i expect the same step to be reprocessed, instead it goes to the next
with this job configuration it works as expected:
@Bean
public Job job(Step failingStep) {
return this.jobBuilderFactory.get("job")
.incrementer(new RunIdIncrementer())
.start(failingStep)
.end()
.build();
}
i'm not sure if it's working as intended and i need to configure a JobExecutionDecider to implement restartability of a chunk based step,
if so, please advice on how to do it
thank you