Class 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 java.lang.Object
    A builder for transitions within a flow.
    Author:
    Dave Syer
    • Constructor Detail

      • TransitionBuilder

        public TransitionBuilder​(FlowBuilder<Q> parent,
                                 java.lang.String pattern)
    • Method Detail

      • 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​(java.lang.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