org.springframework.batch.core.jsr.job.flow.support

## Class JsrFlow

- java.lang.Object
- - org.springframework.batch.core.job.flow.support.SimpleFlow
  - - org.springframework.batch.core.jsr.job.flow.support.JsrFlow

- All Implemented Interfaces:
    Flow, org.springframework.beans.factory.InitializingBean

      public class JsrFlow
      extends SimpleFlow

  Implements JSR-352 specific logic around the execution of a flow. Specifically, this `Flow` implementation will attempt to find the next state based on the provided exit status. If none is found (the exit status isn't mapped), it will attempt to resolve the next state basing it on the last step's batch status. Only if both attempts fail, the flow will fail due to the inability to find the next state.
  Since:
    3.0
  Author:
    Michael Minella

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsrFlow(java.lang.String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getMostRecentStepName()`
    `protected boolean` | `isFlowContinued(State state, FlowExecutionStatus status, StepExecution stepExecution)`
    `protected State` | `nextState(java.lang.String stateName, FlowExecutionStatus status, StepExecution stepExecution)`

    - ### Methods inherited from class org.springframework.batch.core.job.flow.support.SimpleFlow

      `afterPropertiesSet, getName, getStartState, getState, getStateMap, getStates, getTransitionMap, resume, setStateTransitionComparator, setStateTransitions, start`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JsrFlow

          public JsrFlow(java.lang.String name)

      Parameters:
        `name` - name of the flow

  - ### Method Detail

    - #### getMostRecentStepName

          public java.lang.String getMostRecentStepName()

    - #### isFlowContinued

          protected boolean isFlowContinued(State state,
                                            FlowExecutionStatus status,
                                            StepExecution stepExecution)

      Overrides:
        `isFlowContinued` in class `SimpleFlow`

    - #### nextState

          protected State nextState(java.lang.String stateName,
                                    FlowExecutionStatus status,
                                    StepExecution stepExecution)
                             throws FlowExecutionException

      Overrides:
        `nextState` in class `SimpleFlow`
      Returns:
        the next `Step` (or null if this is the end)
      Throws:
        `FlowExecutionException`