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) {
77 $detector->onActivate();
88 $this->active =
false;
89 foreach ($this->detectors as $detector) {
90 $detector->onDeactivate();
107 return eval($this->evaluation_expression);
110 if ($eval_function($this->detectors) ===
null) {
114 if ($eval_function($this->detectors) ===
true) {
132 return eval($this->evaluation_expression);
135 if ($eval_function($this->detectors) ===
null) {
139 if ($eval_function($this->detectors) ===
true) {
153 if (count($this->activities) != 0) {
154 foreach ($this->activities as $activity) {
155 $activity->execute();
165 if (count($this->else_activities) != 0) {
166 foreach ($this->else_activities as $activity) {
167 $activity->execute();
177 if (count($this->emitters) != 0) {
178 foreach ($this->emitters as $emitter) {
189 if (count($this->else_emitters) != 0) {
190 foreach ($this->else_emitters as $emitter) {
224 if (!$else_emitter) {
225 $this->emitters[] = $emitter;
227 $this->else_emitters[] = $emitter;
239 if (!$else_activity) {
240 $this->activities[] = $activity;
242 $this->else_activities[] = $activity;
284 $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