https://grokonez.com/spring-framework/spring-batch/spring-batch-programmatic-flow-decision
Spring Batch – Programmatic Flow Decision
In the article, JavaSampleApproach will introduce about Programmatic Flow Decisions in Spring Batch.
Related Post: Spring Batch
package org.springframework.batch.core.job.flow;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.StepExecution;
/**
* Interface allowing for programmatic access to the decision on what the status
* of a flow should be. For example, if some condition that's stored in the
* database indicates that the job should stop for a manual check, a decider
* implementation could check that value to determine the status of the flow.
*
* @author Dave Syer
* @since 2.0
*/
public interface JobExecutionDecider {
/**
* Strategy for branching an execution based on the state of an ongoing
* {@link JobExecution}. The return value will be used as a status to
* determine the next step in the job.
*
* @param jobExecution a job execution
* @param stepExecution the latest step execution (may be null)
* @return the exit status code
*/
FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution);
}
More at:
https://grokonez.com/spring-framework/spring-batch/spring-batch-programmatic-flow-decision
Spring Batch – Programmatic Flow Decision
#springbatch #programmatic #flow