5 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBaseNode.php';
40 $this->detectors =
array();
41 $this->emitters =
array();
42 $this->else_emitters =
array();
43 $this->activities =
array();
44 $this->is_exclusive =
false;
69 foreach($this->detectors as $detector)
71 $detector->onActivate();
82 $this->active =
false;
83 foreach($this->detectors as $detector)
85 $detector->onDeactivate();
102 $isPreconditionMet =
true;
103 foreach ($this->detectors as $detector)
105 if ($isPreconditionMet ==
true)
107 $isPreconditionMet = $detector->getDetectorState();
108 if($isPreconditionMet && ($this->is_exclusive_join || $this->is_exclusive_fork || $this->is_exclusive))
114 return $isPreconditionMet;
144 if (count($this->activities) != 0)
146 foreach ($this->activities as $activity)
148 $activity->execute();
152 foreach((
array)$this->condition_emitter_pairs as $pair)
155 $eval_function = create_function(
'$that', $pair[
'expression']);
156 if($eval_function($this->detectors) ===
true)
158 $emitter = $pair[
'emitter'];
160 if($this->is_exclusive_fork || $this->is_exclusive_join)
176 $this->condition_emitter_pairs[] =
array(
177 'emitter' => $emitter,
178 'expression' => $expression
attemptTransition()
Attempts to transit the node.
checkTransitionPreconditions()
Checks, if the preconditions of the node to transit are met.
notifyDetectorSatisfaction(ilDetector $detector)
This method is called by detectors, that just switched to being satisfied.
setIsExclusiveFork($is_exclusive)
activate()
Activates the node.
isActive()
Returns the activation status of the node.
addEmitter(ilEmitter $emitter, $expression='return true;')
Adds an emitter to one of the lists attached to the node.
deactivate()
Deactivates the node.
onActivate()
Method called on activation of the node.
onDeactivate()
Method calles on deactivation of the node.
executeTransition()
Executes the 'then'-transition of the node.
Create styles array
The data for the language used.
__construct(ilWorkflow $context)
Default constructor.
ilDetector Interface is part of the petri net based workflow engine.
ilEmitter Interface is part of the petri net based workflow engine.
setIsExclusiveJoin($is_exclusive)