5require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBaseNode.php';
62 $this->context = $a_context;
63 $this->detectors = array();
64 $this->emitters = array();
65 $this->else_emitters = array();
66 $this->activities = array();
67 $this->else_activities = array();
76 foreach($this->detectors as $detector)
78 $detector->onActivate();
89 $this->active =
false;
90 foreach($this->detectors as $detector)
92 $detector->onDeactivate();
108 $eval_function = create_function(
'$detectors', $this->evaluation_expression);
110 if ($eval_function($this->detectors) ===
null)
115 if ($eval_function($this->detectors) ===
true)
135 $eval_function = create_function(
'$detectors', $this->evaluation_expression);
137 if ($eval_function($this->detectors) ===
null)
142 if ($eval_function($this->detectors) ===
true)
159 if (count($this->activities) != 0)
161 foreach ($this->activities as $activity)
163 $activity->execute();
173 if (count($this->else_activities) != 0)
175 foreach ($this->else_activities as $activity)
177 $activity->execute();
187 if (count($this->emitters) != 0)
189 foreach ($this->emitters as $emitter)
201 if (count($this->else_emitters) != 0)
203 foreach ($this->else_emitters as $emitter)
240 $this->emitters[] = $emitter;
244 $this->else_emitters[] = $emitter;
258 $this->activities[] = $activity;
262 $this->else_activities[] = $activity;
304 $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
activate()
Activates the node.
executeElseActivities()
Exectes all 'else'-activities attached to the node.
addActivity(ilActivity $activity, $else_activity=false)
Adds an activity to one of the lists attached to the node.
executeEmitters()
Executes all 'then'-emitters attached to the node.
setEvaluationExpression($a_expression)
attemptTransition()
Attempts to transit the node.
getEmitters($else=false)
Returns all currently set emitters.
addEmitter(ilEmitter $emitter, $else_emitter=false)
Adds an emitter to one of the lists attached to the node.
executeElseTransition()
Executes the 'else'-transition of the node.
notifyDetectorSatisfaction(ilDetector $detector)
This method is called by detectors, that just switched to being satisfied.
getActivities($else=false)
Returns all currently set activites.
checkTransitionPreconditions()
Checks, if the preconditions of the node to transit are met.
__construct(ilWorkflow $a_context)
Default constructor.
executeTransition()
Executes the 'then'-transition of the node.
deactivate()
Deactivates the node.
executeElseEmitters()
Executes all 'else'-emitters attached to the node.
executeActivities()
Executes all 'then'-activities attached to the node.
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