30 Temmuz 2018 Pazartesi

SpringBatch JobExecutionDecider Arayüzü

Giriş
Şu satırı dahil ederiz.
import org.springframework.batch.core.job.flow.FlowExecutionStatus;
import org.springframework.batch.core.job.flow.JobExecutionDecider;
decide metodu
Şöyle yaparız.
public class StepDecider implements JobExecutionDecider {

  @Override
  public FlowExecutionStatus decide(
    org.springframework.batch.core.JobExecution jobExecution,
    org.springframework.batch.core.StepExecution stepExecution) {

    String fileTypeCode = jobExecution.getExecutionContext().getString("FileTypeCode");
    String returnStatus = "";
    ...
    return new FlowExecutionStatus(returnStatus);
  }
}

Hiç yorum yok:

Yorum Gönder