Class StepExecution

java.lang.Object
edu.tufts.hrilab.action.execution.StepExecution

public class StepExecution extends Object
StepExecution the execution process for executing a context step: canDoStep, doStep, getNextStep, finishStep.
  • Field Details

    • log

      protected static final org.slf4j.Logger log
  • Constructor Details

  • Method Details

    • execute

      public Context execute(Context step)
      execute executes action: check pre conditions, argument constraints do step get next step finish
      Parameters:
      step - context to execute
      Returns:
      anypoint return next action or null
    • canDoStep

      public Justification canDoStep(Context context)
      canDoStep initializes the context. then checks to see if the action is approved to execute: permissible, pre-conditions, argument-constraints. then it will return the justification for whether the context can execute.
      Parameters:
      context - the context step which will be executed
      Returns:
      justification for why/not approved to execute.
    • doStep

      public void doStep(Context context)
      doStep execute the context step: start overall condition monitors, update the state machine, if the step is an action, execute context.
      Parameters:
      context - step to be executed
    • getNextStep

      public Context getNextStep(Context context)
      getNextAction selects the next sub step to be executed
      Parameters:
      context - the step that is being executed, used to get sub steps
      Returns:
      a sub step for to execute, may return null to depict no more steps or exitcontext
    • finishStep

      public Justification finishStep(Context context)
      finishStep finish the context step: verify the effects, update state machine, if step is an action. return a justifcation for success/failure.
      Parameters:
      context - step to be completes
      Returns:
      justification for success/failure