Package cmion.level2
Class CompetencyExecutionPlan
- java.lang.Object
-
- cmion.level2.CompetencyExecutionPlan
-
public class CompetencyExecutionPlan extends java.lang.Objecta 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
Constructors Constructor Description CompetencyExecutionPlan(IArchitecture architecture)creates a new competencyExecutionPlan with no stepsCompetencyExecutionPlan(org.w3c.dom.Node domNode, IArchitecture architecture)creates a new competencyExecutionPlan from a DOM node
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompetencyExecutionPlangetInstantiatedCopy(java.util.HashMap<java.lang.String,java.lang.String> mappings, MindAction mindAction)returns an instantiated copy of this competency execution planMindActiongetMindAction()returns the mind action that this plan is executingintgetNoOfSteps()returns the no of steps in the planCompetencyExecutionPlanStepgetPlanStep(java.lang.String id)returns the plan step with the given id or null if such a step does not existjava.util.Collection<CompetencyExecutionPlanStep>getPlanSteps()returns all plan steps as a collection, do not modify this collection and do only use this method on instantiated competencyExecution Plansjava.util.ArrayList<CompetencyExecutionPlanStep>getStepsAlreadyCompleted()returns the steps of the plan that have already been completed, this list may be modified outside of the classjava.util.ArrayList<CompetencyExecutionPlanStep>getStepsCurrentlyExecuted()returns the steps of the plan that are currently being executed, this list may be modified outside of the classbooleanisCurrentlyExecuting()returns whether this plan is currently executing (only relevant for instantiated plans)booleanisInstantiated()returns whether this plan is instantiatedvoidstartExecution()the competency execution system should call this when it starts executing a plan (only relevant for instantiated plans)voidstopExecution()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)
-
-
-
Constructor Detail
-
CompetencyExecutionPlan
public CompetencyExecutionPlan(IArchitecture architecture)
creates a new competencyExecutionPlan with no steps
-
CompetencyExecutionPlan
public CompetencyExecutionPlan(org.w3c.dom.Node domNode, IArchitecture architecture) throws java.lang.Exceptioncreates a new competencyExecutionPlan from a DOM node- Throws:
java.lang.Exception
-
-
Method Detail
-
getInstantiatedCopy
public CompetencyExecutionPlan getInstantiatedCopy(java.util.HashMap<java.lang.String,java.lang.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
public java.util.Collection<CompetencyExecutionPlanStep> getPlanSteps()
returns all plan steps as a collection, do not modify this collection and do only use this method on instantiated competencyExecution Plans
-
getPlanStep
public CompetencyExecutionPlanStep getPlanStep(java.lang.String id)
returns the plan step with the given id or null if such a step does not exist
-
getStepsAlreadyCompleted
public java.util.ArrayList<CompetencyExecutionPlanStep> getStepsAlreadyCompleted()
returns the steps of the plan that have already been completed, this list may be modified outside of the class
-
getStepsCurrentlyExecuted
public java.util.ArrayList<CompetencyExecutionPlanStep> 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
public MindAction getMindAction()
returns the mind action that this plan is executing
-
-