5 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBaseNode.php';
40 $this->detectors = array();
41 $this->emitters = array();
42 $this->else_emitters = array();
43 $this->activities = array();
44 $this->is_exclusive =
false;
69 foreach ($this->detectors as $detector) {
70 $detector->onActivate();
81 $this->active =
false;
82 foreach ($this->detectors as $detector) {
83 $detector->onDeactivate();
100 $isPreconditionMet =
true;
101 foreach ($this->detectors as $detector) {
102 if ($isPreconditionMet ==
true) {
103 $isPreconditionMet = $detector->getDetectorState();
104 if ($isPreconditionMet && ($this->is_exclusive_join || $this->is_exclusive_fork || $this->is_exclusive)) {
109 return $isPreconditionMet;
136 if (count($this->activities) != 0) {
137 foreach ($this->activities as $activity) {
138 $activity->execute();
142 foreach ((array) $this->condition_emitter_pairs as $pair) {
143 $eval_function =
function ($that) use ($pair) {
144 return eval($pair[
'expression']);
147 if ($eval_function($this->detectors) ===
true) {
148 $emitter = $pair[
'emitter'];
150 if ($this->is_exclusive_fork || $this->is_exclusive_join) {
165 $this->condition_emitter_pairs[] = array(
166 'emitter' => $emitter,
167 'expression' => $expression
attemptTransition()
Attempts to transit the node.
checkTransitionPreconditions()
Checks, if the preconditions of the node to transit are met.
notifyDetectorSatisfaction(ilDetector $detector)
This method is called by detectors, that just switched to being satisfied.
setIsExclusiveFork($is_exclusive)
activate()
Activates the node.
isActive()
Returns the activation status of the node.
addEmitter(ilEmitter $emitter, $expression='return true;')
Adds an emitter to one of the lists attached to the node.
deactivate()
Deactivates the node.
onActivate()
Method called on activation of the node.
onDeactivate()
Method calles on deactivation of the node.
executeTransition()
Executes the 'then'-transition of the node.
__construct(ilWorkflow $context)
Default constructor.
ilDetector Interface is part of the petri net based workflow engine.
ilEmitter Interface is part of the petri net based workflow engine.
setIsExclusiveJoin($is_exclusive)