Class ExitContext


public class ExitContext extends ArgumentBasedContext
The Exit control can be used to end the execution of a script. An ActionStatus can be specified to set the exit status. If the ActionStatus is a failure status, a list of Predicates (or java Collections) can be specified as arguments and will be used as failConditions to explain the reason behind the exit. Usage example: <control>exit FAIL not(safe) danger(ahead)</control> will exit with a FAIL status and set the two above predicates as fail conditions. Note that Collections can also be used as arguments, e.g. a set of predicates.
  • Constructor Details

  • Method Details

    • setupArguments

      protected void setupArguments(List<? extends Object> inputArgs, List<? extends Object> returnArgs)
      Specified by:
      setupArguments in class ArgumentBasedContext
    • doStep

      public void doStep()
      Description copied from class: Context
      If Context has a concrete execution step to perform, it should happen in this method. This should not include setting up next steps (i.e., children to perform), which should happen in the setupNextStep method. Primitive actions and operators (i.e., leaf nodes in the context tree) are examples where this method should be implemented.
      Overrides:
      doStep in class Context
    • getNextStepForType

      protected Context getNextStepForType()
      Description copied from class: Context
      Get the next step (i.e., context) to be executed. Returns null if there are no more steps. TODO: remove this method
      Overrides:
      getNextStepForType in class Context
      Returns:
    • copy

      public ExitContext copy(Context newParent)
      Description copied from class: Context
      deep copy of the context, its status, and its children
      Specified by:
      copy in class Context
      Parameters:
      newParent - parent to attach the copied context too
      Returns:
      the copied context