Class StepFlow

  • All Implemented Interfaces:
    java.io.Serializable

    public class StepFlow
    extends java.lang.Object
    implements java.io.Serializable
    StepFlow that consists of a list of steps. When a step is completed, notify its stepFlow by calling stepCompleted(Step).
    Since:
    4.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      StepFlow()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addStep​(Step step)
      Add step to this StepFlow
      protected void completed()
      completed: called after this StepFlow is completed.
      void removeStep​(int index)
      Remove step from this StepFlow
      boolean start()
      Start this StepFlow to run the first step that should not be skipped.
      void stepCompleted​(Step step)
      stepCompleted: called after the step is completed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StepFlow

        public StepFlow()
    • Method Detail

      • addStep

        public void addStep​(Step step)
        Add step to this StepFlow
        Parameters:
        step - the step to add
      • removeStep

        public void removeStep​(int index)
        Remove step from this StepFlow
        Parameters:
        index - the index of the step to remove
      • start

        public boolean start()
                      throws SystemException
        Start this StepFlow to run the first step that should not be skipped.
        Returns:
        true if a step is found and run. return false if there are no runnable steps.
        Throws:
        SystemException - throw if an error occurs in running steps
      • stepCompleted

        public void stepCompleted​(Step step)
                           throws SystemException
        stepCompleted: called after the step is completed. Go to the next step. Call the completed() method if the step is the last step.
        Parameters:
        step - the step completed
        Throws:
        SystemException - throw if an error occurs
      • completed

        protected void completed()
                          throws SystemException
        completed: called after this StepFlow is completed. Default: do nothing.
        Throws:
        SystemException - throw if an error occurs