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) {
66 $detector->onActivate();
77 $this->active =
false;
78 foreach ($this->detectors as $detector) {
79 $detector->onDeactivate();
93 if ($this->active ==
true && count($this->detectors) != 0) {
94 foreach ($this->detectors as $detector) {
95 if (get_class($detector) ==
$a_type) {
96 $detector->trigger($a_params);
116 return eval($this->evaluation_expression);
119 if ($eval_function($this->detectors) ===
null) {
123 if ($eval_function($this->detectors) ===
true) {
142 return eval($this->evaluation_expression);
145 if ($eval_function($this->detectors) ===
null) {
149 if ($eval_function($this->detectors) ===
true) {
153 $this->executeElseTransition();
163 if (count($this->activities) != 0) {
164 foreach ($this->activities as $activity) {
165 $activity->execute();
175 if (count($this->emitters) != 0) {
176 foreach ($this->emitters as $emitter) {
200 if (!$else_emitter) {
201 $this->emitters[] = $emitter;
203 $this->else_emitters[] = $emitter;
215 if (!$else_activity) {
216 $this->activities[] = $activity;
218 $this->else_activities[] = $activity;
261 $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