Package cmion.level2

Class CompetencyExecutionPlan

java.lang.Object
cmion.level2.CompetencyExecutionPlan

public class CompetencyExecutionPlan extends Object
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 Details

    • CompetencyExecutionPlan

      public CompetencyExecutionPlan(IArchitecture architecture)
      creates a new competencyExecutionPlan with no steps
    • CompetencyExecutionPlan

      public CompetencyExecutionPlan(Node domNode, IArchitecture architecture) throws Exception
      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 instantiation
      mindAction - 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 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(String id)
      returns the plan step with the given id or null if such a step does not exist
    • getStepsAlreadyCompleted

      public 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 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