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 TypeMethodDescriptioncanDoStep
initializes the context.void
doStep
execute the context step: start overall condition monitors, update the state machine, if the step is an action, execute context.execute
executes action: check pre conditions, argument constraints do step get next step finishfinishStep
(Context context) finishStep
finish the context step: verify the effects, update state machine, if step is an action.getNextStep
(Context context) getNextAction
selects the next sub step to be executed
-
Field Details
-
log
protected static final org.slf4j.Logger log
-
-
Constructor Details
-
StepExecution
-
-
Method Details
-
execute
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
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
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
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
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
-