5 require_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;
deactivate()
Deactivates the node.
__construct(ilWorkflow $context)
Default constructor.
notifyDetectorSatisfaction(ilDetector $detector)
This method is called by detectors, that just switched to being satisfied.
trigger($a_type, $a_params=null)
Passes a trigger to attached detectors.
attemptTransition()
Attempts to transit the node.
setEvaluationExpression($a_expression)
isActive()
Returns the activation status of the node.
getEmitters($else=false)
Returns all currently set emitters.
checkTransitionPreconditions()
Checks, if the preconditions of the node to transit are met.
onActivate()
Method called on activation of the node.
getActivities($else=false)
Returns all currently set activites.
onDeactivate()
Method calles on deactivation of the node.
Create styles array
The data for the language used.
executeActivities()
Executes all 'then'-activities attached to the node.
executeTransition()
Executes the 'then'-transition of the node.
executeEmitters()
Executes all 'then'-emitters attached to the node.
ilDetector Interface is part of the petri net based workflow engine.
ilActivity Interface is part of the petri net based workflow engine.
addEmitter(ilEmitter $emitter, $else_emitter=false)
Adds an emitter to one of the lists attached to the node.
addActivity(ilActivity $activity, $else_activity=false)
Adds an activity to one of the lists attached to the node.
ilEmitter Interface is part of the petri net based workflow engine.
activate()
Activates the node.