Package org.springframework.batch.core.job.builder

# Class FlowBuilder.TransitionBuilder<Q>

java.lang.Object
org.springframework.batch.core.job.builder.FlowBuilder.TransitionBuilder<Q>

Type Parameters:
  `Q` - the result of the parent builder's build()

Enclosing class:
  FlowBuilder<Q>

public static class FlowBuilder.TransitionBuilder<Q> extends Object
A builder for transitions within a flow.

Author:
  Dave Syer

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TransitionBuilder(FlowBuilder<Q> parent, String pattern)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FlowBuilder<Q>`
  `end()`
  Signal the successful end of the flow.
  `FlowBuilder<Q>`
  `end(String status)`
  Signal the end of the flow with the status provided.
  `FlowBuilder<Q>`
  `fail()`
  Signal the end of the flow with an error condition.
  `FlowBuilder<Q>`
  `stop()`
  Signal the successful end of the flow.
  `FlowBuilder<Q>`
  `stopAndRestart(Flow flow)`
  Stop the flow and provide a flow to start with if the flow is restarted.
  `FlowBuilder<Q>`
  `stopAndRestart(JobExecutionDecider decider)`
  Stop the flow and provide a decider to start with if the flow is restarted.
  `FlowBuilder<Q>`
  `stopAndRestart(Step restart)`
  Stop the flow and provide a step to start with if the flow is restarted.
  `FlowBuilder<Q>`
  `to(Flow flow)`
  Specify the next state as a complete flow.
  `FlowBuilder<Q>`
  `to(JobExecutionDecider decider)`
  Specify the next state as a decision.
  `FlowBuilder<Q>`
  `to(Step step)`
  Specify the next step.

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

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

- ## Constructor Details

  - ### TransitionBuilder

    public TransitionBuilder(FlowBuilder<Q> parent, String pattern)

- ## Method Details

  - ### to

    public FlowBuilder<Q> to(Step step)
    Specify the next step.
    Parameters:
      `step` - the next step after this transition
    Returns:
      a FlowBuilder

  - ### to

    public FlowBuilder<Q> to(Flow flow)
    Specify the next state as a complete flow.
    Parameters:
      `flow` - the next flow after this transition
    Returns:
      a FlowBuilder

  - ### to

    public FlowBuilder<Q> to(JobExecutionDecider decider)
    Specify the next state as a decision.
    Parameters:
      `decider` - the decider to determine the next step
    Returns:
      a FlowBuilder

  - ### stop

    public FlowBuilder<Q> stop()
    Signal the successful end of the flow.
    Returns:
      a FlowBuilder

  - ### stopAndRestart

    public FlowBuilder<Q> stopAndRestart(Flow flow)
    Stop the flow and provide a flow to start with if the flow is restarted.
    Parameters:
      `flow` - the flow to restart with
    Returns:
      a FlowBuilder

  - ### stopAndRestart

    public FlowBuilder<Q> stopAndRestart(JobExecutionDecider decider)
    Stop the flow and provide a decider to start with if the flow is restarted.
    Parameters:
      `decider` - a decider to restart with
    Returns:
      a FlowBuilder

  - ### stopAndRestart

    public FlowBuilder<Q> stopAndRestart(Step restart)
    Stop the flow and provide a step to start with if the flow is restarted.
    Parameters:
      `restart` - the step to restart with
    Returns:
      a FlowBuilder

  - ### end

    public FlowBuilder<Q> end()
    Signal the successful end of the flow.
    Returns:
      a FlowBuilder

  - ### end

    public FlowBuilder<Q> end(String status)
    Signal the end of the flow with the status provided.
    Parameters:
      `status` - `String` containing the status.
    Returns:
      a FlowBuilder

  - ### fail

    public FlowBuilder<Q> fail()
    Signal the end of the flow with an error condition.
    Returns:
      a FlowBuilder