concept execution in category spring

appears as: execution, execution, executions, n execution, executions
Spring Batch in Action

This is an excerpt from Manning's book Spring Batch in Action.

Figure 2.7 illustrates the correspondence between a job, its instances, and their executions for two days of executions of the import products job.

Listing 3.15. Listening to job execution with a listener
public class ImportProductsJobListener implements JobExecutionListener { public void beforeJob(JobExecution jobExecution) { // Called when job starts } public void afterJob(JobExecution jobExecution) { if (jobExecution.getStatus()==BatchStatus.COMPLETED) { // Called when job ends successfully } else if (jobExecution.getStatus()==BatchStatus.FAILED) { // Called when job ends in failure } } }

A job consists of steps, and execution refers to the sequence of steps that run when a job starts. In simple jobs, the sequence of steps is linear. In complex jobs, execution can take multiple paths, and the sequence is no longer linear. Figure 10.1 shows the structure of a simple, linear job and a more complex, nonlinear job.

Figure 10.3. A nonlinear flow. If the read-write step fails, the execution shouldn’t end; instead, the job should generate a report. For all other cases, the execution proceeds directly to the cleanup step.