Class StepExecution
java.lang.Object
edu.tufts.hrilab.action.execution.StepExecution
StepExecution the execution process for executing
a context step: canDoStep, doStep, getNextStep, finishStep.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanDoStepinitializes the context.voiddoStepexecute the context step: start overall condition monitors, update the state machine, if the step is an action, execute context.executeexecutes action: check pre conditions, argument constraints do step get next step finishfinishStep(Context context) finishStepfinish the context step: verify the effects, update state machine, if step is an action.getNextStep(Context context) getNextActionselects the next sub step to be executed
-
Field Details
-
log
protected static final org.slf4j.Logger log
-
-
Constructor Details
-
StepExecution
-
-
Method Details
-
execute
executeexecutes 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
canDoStepinitializes 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
doStepexecute 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
getNextActionselects 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
finishStepfinish 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
-