org.springframework.batch.core.job.flow

## Interface FlowExecutor

- All Known Implementing Classes:
    JobFlowExecutor, JsrFlowExecutor

      public interface FlowExecutor

  Context and execution strategy for `FlowJob` to allow it to delegate its execution step by step.
  Since:
    2.0
  Author:
    Dave Syer

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abandonStepExecution()` Handle any status changes that might be needed at the start of a state.
    `void` | `addExitStatus(java.lang.String code)`
    `void` | `close(FlowExecution result)` Chance to clean up resources at the end of a flow (whether it completed successfully or not).
    `java.lang.String` | `executeStep(Step step)`
    `JobExecution` | `getJobExecution()`
    `StepExecution` | `getStepExecution()`
    `boolean` | `isRestart()`
    `void` | `updateJobExecutionStatus(FlowExecutionStatus status)` Handle any status changes that might be needed in the `JobExecution`.

- - ### Method Detail

    - #### executeStep

          java.lang.String executeStep(Step step)
                                throws JobInterruptedException,
                                       JobRestartException,
                                       StartLimitExceededException

      Parameters:
        `step` - a `Step` to execute
      Returns:
        the exit status that drives the surrounding `Flow`
      Throws:
        `StartLimitExceededException`
        `JobRestartException`
        `JobInterruptedException`

    - #### getJobExecution

          JobExecution getJobExecution()

      Returns:
        the current `JobExecution`

    - #### getStepExecution

          StepExecution getStepExecution()

      Returns:
        the latest `StepExecution` or null if there is none

    - #### close

          void close(FlowExecution result)

      Chance to clean up resources at the end of a flow (whether it completed successfully or not).
      Parameters:
        `result` - the final `FlowExecution`

    - #### abandonStepExecution

          void abandonStepExecution()

      Handle any status changes that might be needed at the start of a state.

    - #### updateJobExecutionStatus

          void updateJobExecutionStatus(FlowExecutionStatus status)

      Handle any status changes that might be needed in the `JobExecution`.

    - #### isRestart

          boolean isRestart()

      Returns:
        true if the flow is at the beginning of a restart

    - #### addExitStatus

          void addExitStatus(java.lang.String code)

      Parameters:
        `code` - the label for the exit status when a flow or sub-flow ends