Package cmion.level2
Class CompetencyExecutionPlan
java.lang.Object
cmion.level2.CompetencyExecutionPlan
a plan of competencies that can be executed by the competency execution system,
this class is used to represent both instantiated and not instantiated execution plans.
Inside the competency manager rules uninstantiated execution plans are stored, while
once the competency manager selects a plan, it creates an instantiated copy ($ variables
in the competency parameters of the plan steps are replaced by actual values)
-
Constructor Summary
ConstructorsConstructorDescriptionCompetencyExecutionPlan(IArchitecture architecture) creates a new competencyExecutionPlan with no stepsCompetencyExecutionPlan(Node domNode, IArchitecture architecture) creates a new competencyExecutionPlan from a DOM node -
Method Summary
Modifier and TypeMethodDescriptiongetInstantiatedCopy(HashMap<String, String> mappings, MindAction mindAction) returns an instantiated copy of this competency execution planreturns the mind action that this plan is executingintreturns the no of steps in the plangetPlanStep(String id) returns the plan step with the given id or null if such a step does not existreturns all plan steps as a collection, do not modify this collection and do only use this method on instantiated competencyExecution Plansreturns the steps of the plan that have already been completed, this list may be modified outside of the classreturns the steps of the plan that are currently being executed, this list may be modified outside of the classbooleanreturns whether this plan is currently executing (only relevant for instantiated plans)booleanreturns whether this plan is instantiatedvoidthe competency execution system should call this when it starts executing a plan (only relevant for instantiated plans)voidthe competency execution system should call this when it has finished executing a plan (both in case of plan failure and success), (only relevant for instantiated plans)
-
Constructor Details
-
CompetencyExecutionPlan
creates a new competencyExecutionPlan with no steps -
CompetencyExecutionPlan
creates a new competencyExecutionPlan from a DOM node- Throws:
Exception
-
-
Method Details
-
getInstantiatedCopy
public CompetencyExecutionPlan getInstantiatedCopy(HashMap<String, String> mappings, MindAction mindAction) returns an instantiated copy of this competency execution plan- Parameters:
mappings- the mappings for variables to use for instantiationmindAction- the mind action which this plan is executing- Returns:
- a new competency execution plan which is an instantiated copy of the calling object
-
getNoOfSteps
public int getNoOfSteps()returns the no of steps in the plan -
getPlanSteps
returns all plan steps as a collection, do not modify this collection and do only use this method on instantiated competencyExecution Plans -
getPlanStep
returns the plan step with the given id or null if such a step does not exist -
getStepsAlreadyCompleted
returns the steps of the plan that have already been completed, this list may be modified outside of the class -
getStepsCurrentlyExecuted
returns the steps of the plan that are currently being executed, this list may be modified outside of the class -
isInstantiated
public boolean isInstantiated()returns whether this plan is instantiated -
isCurrentlyExecuting
public boolean isCurrentlyExecuting()returns whether this plan is currently executing (only relevant for instantiated plans) -
startExecution
public void startExecution()the competency execution system should call this when it starts executing a plan (only relevant for instantiated plans) -
stopExecution
public void stopExecution()the competency execution system should call this when it has finished executing a plan (both in case of plan failure and success), (only relevant for instantiated plans) -
getMindAction
returns the mind action that this plan is executing
-