5require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBaseNode.php';
52 $this->detectors = array();
53 $this->emitters = array();
54 $this->else_emitters = array();
55 $this->activities = array();
56 $this->else_activities = array();
65 foreach($this->detectors as $detector)
67 $detector->onActivate();
78 $this->active =
false;
79 foreach($this->detectors as $detector)
81 $detector->onDeactivate();
95 if ($this->active ==
true && count($this->detectors) != 0)
97 foreach($this->detectors as $detector)
99 if (get_class($detector) ==
$a_type)
101 $detector->trigger($a_params);
120 $eval_function = create_function(
'$detectors', $this->evaluation_expression);
122 if ($eval_function($this->detectors) ===
null)
127 if ($eval_function($this->detectors) ===
true)
148 $eval_function = create_function(
'$detectors', $this->evaluation_expression);
150 if ($eval_function($this->detectors) ===
null)
155 if ($eval_function($this->detectors) ===
true)
162 $this->executeElseTransition();
172 if (count($this->activities) != 0)
174 foreach ($this->activities as $activity)
176 $activity->execute();
186 if (count($this->emitters) != 0)
188 foreach ($this->emitters as $emitter)
215 $this->emitters[] = $emitter;
219 $this->else_emitters[] = $emitter;
233 $this->activities[] = $activity;
237 $this->else_activities[] = $activity;
280 $this->evaluation_expression = $a_expression;
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
onDeactivate()
Method calles on deactivation of the node.
isActive()
Returns the activation status of the node.
onActivate()
Method called on activation of the node.
@noinspection PhpIncludeInspection
executeActivities()
Executes all 'then'-activities attached to the node.
attemptTransition()
Attempts to transit the node.
activate()
Activates the node.
__construct(ilWorkflow $context)
Default constructor.
checkTransitionPreconditions()
Checks, if the preconditions of the node to transit are met.
trigger($a_type, $a_params=null)
Passes a trigger to attached detectors.
executeEmitters()
Executes all 'then'-emitters attached to the node.
notifyDetectorSatisfaction(ilDetector $detector)
This method is called by detectors, that just switched to being satisfied.
addActivity(ilActivity $activity, $else_activity=false)
Adds an activity to one of the lists attached to the node.
executeTransition()
Executes the 'then'-transition of the node.
getActivities($else=false)
Returns all currently set activites.
deactivate()
Deactivates the node.
setEvaluationExpression($a_expression)
addEmitter(ilEmitter $emitter, $else_emitter=false)
Adds an emitter to one of the lists attached to the node.
getEmitters($else=false)
Returns all currently set emitters.
ilActivity Interface is part of the petri net based workflow engine.
ilDetector Interface is part of the petri net based workflow engine.
ilEmitter Interface is part of the petri net based workflow engine.
@noinspection PhpIncludeInspection