Class StateDecision


  • @Immutable
    public abstract class StateDecision
    extends java.lang.Object
    • Field Detail

      • FORCE_FAILING_WORKFLOW

        public static final StateDecision FORCE_FAILING_WORKFLOW
    • Constructor Detail

      • StateDecision

        public StateDecision()
    • Method Detail

      • getNextStates

        public abstract java.util.List<StateMovement> getNextStates()
      • builder

        public static io.iworkflow.core.ImmutableStateDecision.Builder builder()
      • gracefulCompleteWorkflow

        public static StateDecision gracefulCompleteWorkflow​(java.lang.Object output)
      • gracefulCompleteWorkflow

        public static StateDecision gracefulCompleteWorkflow()
      • forceCompleteWorkflow

        public static StateDecision forceCompleteWorkflow​(java.lang.Object output)
      • forceCompleteWorkflow

        public static StateDecision forceCompleteWorkflow()
      • forceFailWorkflow

        public static StateDecision forceFailWorkflow​(java.lang.Object output)
      • forceFailWorkflow

        public static StateDecision forceFailWorkflow()
      • singleNextState

        public static StateDecision singleNextState​(java.lang.String stateId)
        use the other one with WorkflowState class param if the StateId is provided by default, to make your code cleaner
        Parameters:
        stateId - stateId
        Returns:
        state decision
      • singleNextState

        public static StateDecision singleNextState​(java.lang.Class<? extends WorkflowState> stateClass,
                                                    java.lang.Object stateInput)
      • singleNextState

        public static StateDecision singleNextState​(java.lang.String stateId,
                                                    java.lang.Object stateInput)
        use the other one with WorkflowState class param if the StateId is provided by default, to make your code cleaner
        Parameters:
        stateId - stateId of next state
        stateInput - input for next state
        Returns:
        state decision
      • multiNextStates

        public static StateDecision multiNextStates​(java.lang.String... stateIds)
        use the other one with WorkflowState class param if the StateId is provided by default, to make your code cleaner
        Parameters:
        stateIds - stateIds of next states
        Returns:
        state decision