org.springframework.batch.core.job.flow.FlowExecutionStatus Java Examples

The following examples show how to use org.springframework.batch.core.job.flow.FlowExecutionStatus. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MyDecider.java    From SpringAll with MIT License 5 votes vote down vote up
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
    LocalDate now = LocalDate.now();
    DayOfWeek dayOfWeek = now.getDayOfWeek();

    if (dayOfWeek == DayOfWeek.SATURDAY || dayOfWeek == DayOfWeek.SUNDAY) {
        return new FlowExecutionStatus("weekend");
    } else {
        return new FlowExecutionStatus("workingDay");
    }
}
 
Example #2
Source File: BaseJobDecider.java    From spring-boot-doma2-sample with Apache License 2.0 5 votes vote down vote up
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
    val context = jobExecution.getExecutionContext();

    if (!decideToProceed(context)) {
        return new FlowExecutionStatus(EXECUTION_STATUS_SKIP);
    }

    return FlowExecutionStatus.COMPLETED;
}
 
Example #3
Source File: NumberInfoDecider.java    From tutorials with MIT License 5 votes vote down vote up
@Override
public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) {
    if (shouldNotify()) {
        return new FlowExecutionStatus(NOTIFY);
    } else {
        return new FlowExecutionStatus(QUIET);
    }
}