5 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBaseNode.php';
44 $this->detectors =
array();
45 $this->emitters =
array();
46 $this->activities =
array();
47 $this->active =
false;
48 $this->is_forward_condition_node =
false;
49 $this->is_forward_condition_event =
false;
50 $this->ident = strtoupper(substr(md5(spl_object_hash($this)),0,6));
65 foreach($this->detectors as $detector)
67 $detector->onActivate();
78 $this->active =
false;
79 foreach($this->detectors as $detector)
81 $detector->onDeactivate();
94 $isPreconditionMet =
true;
95 foreach ($this->detectors as $detector)
97 if ($isPreconditionMet ==
true)
99 $isPreconditionMet = $detector->getDetectorState();
102 return $isPreconditionMet;
131 if (count($this->activities) != 0)
133 foreach ($this->activities as $activity)
135 $activity->execute();
145 if (count($this->emitters) != 0)
147 foreach ($this->emitters as $emitter)
161 $this->pingbackToPredecessorNodes();
203 public function deactivateForwardConditionNodes(
ilNode $activated_node)
205 if($this->is_forward_condition_node)
207 foreach ($this->emitters as $emitter)
210 $target_detector = $emitter->getTargetDetector();
213 $target_node = $target_detector->getContext();
215 if ($target_node === $activated_node)
219 $target_node->deactivate();
224 public function pingbackToPredecessorNodes()
227 foreach ($this->detectors as $detector)
230 $source_node = $detector->getSourceNode();
231 if ($source_node && $source_node->is_forward_condition_node)
233 $source_node->deactivateForwardConditionNodes( $this );
$is_forward_condition_event
$is_forward_condition_node
executeTransition()
Executes the transition, calls all activities and emitters to execute.
isActive()
Returns the activation status of the node.
checkTransitionPreconditions()
Checks, if the preconditions of the node to transit are met.
deactivate()
Deactivates the node.
notifyDetectorSatisfaction(ilDetector $detector)
This method is called by detectors, that just switched to being satisfied.
__construct(ilWorkflow $context)
Default constructor.
onActivate()
Method called on activation of the node.
onDeactivate()
Method calles on deactivation of the node.
executeEmitters()
Executes all attached emitters.
Create styles array
The data for the language used.
executeActivities()
Executes all attached activities.
attemptTransition()
Attempts to transit the node.
ilDetector Interface is part of the petri net based workflow engine.
setIsForwardConditionNode($is_forward_condition_node)
activate()
Activates the node.