I made a projet with Spring Batch few month ago.
This project is working fine and is including an implementation of JobExecutionDecider
public class BatchDecider implements JobExecutionDecider {
private static final Logger log = LoggerFactory.getLogger(BatchDecider.class);
@Autowired
ConfigurationServiceWs config;
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
if (codition) {
return new FlowExecutionStatus("AGAIN");
} else {
return new FlowExecutionStatus("FINISH");
}
}
This has working fini with just Spring Batch.
Now I have to use it with Spring Boot Batch. All the process is working fine until the decider step. Where I return the good FlowExecutionStatus, but I don't know why, the job is completed with a "FAILED" status.
2017-01-19 17:11:35.347 DEBUG 23056 --- [nio-8081-exec-1] o.s.b.core.job.flow.support.SimpleFlow : Completed state=Global Job.decision0 with status=AGAIN
2017-01-19 17:11:39.074 DEBUG 23056 --- [nio-8081-exec-1] o.s.b.core.job.flow.support.SimpleFlow : Handling state=Global Job.FAILED
2017-01-19 17:11:41.002 DEBUG 23056 --- [nio-8081-exec-1] o.s.b.core.job.flow.support.SimpleFlow : Completed state=Global Job.FAILED with status=FAILED
2017-01-19 17:11:43.170 DEBUG 23056 --- [nio-8081-exec-1] o.s.batch.core.job.AbstractJob : Job execution complete: JobExecution: id=0, version=1, startTime=Thu Jan 19 17:11:12 CET 2017, endTime=null, lastUpdated=Thu Jan 19 17:11:12 CET 2017, status=FAILED, exitStatus=exitCode=FAILED;exitDescription=, job=[JobInstance: id=0, version=0, Job=[Global Job]], jobParameters=[{time=1484842272108}]
Someone have an idea why isn't working?
Thanks!