ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
InclusiveGateway_Simple_goldsample.php
Go to the documentation of this file.
1 <?php
2 require_once './Services/WorkflowEngine/classes/workflows/class.ilBaseWorkflow.php';
3 require_once './Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
4 require_once './Services/WorkflowEngine/classes/nodes/class.ilCaseNode.php';
5 require_once './Services/WorkflowEngine/classes/emitters/class.ilActivationEmitter.php';
6 require_once './Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
7 
9  {
10 
11  public static $startEventRequired = false;
12 
13  public function __construct()
14  {
15 
16  $_v_StartEvent_1 = new ilBasicNode($this);
17  $this->addNode($_v_StartEvent_1);
18  $_v_StartEvent_1->setName('$_v_StartEvent_1');
19 
20  $this->setStartNode($_v_StartEvent_1);
21 
22  $_v_EndEvent_2 = new ilBasicNode($this);
23  $this->addNode($_v_EndEvent_2);
24  $_v_EndEvent_2->setName('$_v_EndEvent_2');
25 
26  $_v_InclusiveGateway_1 = new ilCaseNode($this);
27  $_v_InclusiveGateway_1->setName('$_v_InclusiveGateway_1');
28  $this->addNode($_v_InclusiveGateway_1);
29 
30  $_v_ParallelGateway_1 = new ilBasicNode($this);
31  $_v_ParallelGateway_1->setName('$_v_ParallelGateway_1');
32  $this->addNode($_v_ParallelGateway_1);
33 
34  $_v_ParallelGateway_1_detector = new ilSimpleDetector($_v_ParallelGateway_1);
35  $_v_ParallelGateway_1_detector->setName('$_v_ParallelGateway_1_detector');
36  $_v_ParallelGateway_1_detector->setSourceNode($_v_StartEvent_1);
37  $_v_ParallelGateway_1->addDetector($_v_ParallelGateway_1_detector);
38  $_v_StartEvent_1_emitter = new ilActivationEmitter($_v_StartEvent_1);
39  $_v_StartEvent_1_emitter->setName('$_v_StartEvent_1_emitter');
40  $_v_StartEvent_1_emitter->setTargetDetector($_v_ParallelGateway_1_detector);
41  $_v_StartEvent_1->addEmitter($_v_StartEvent_1_emitter);
42 
43  $_v_EndEvent_2_detector = new ilSimpleDetector($_v_EndEvent_2);
44  $_v_EndEvent_2_detector->setName('$_v_EndEvent_2_detector');
45  $_v_EndEvent_2_detector->setSourceNode($_v_InclusiveGateway_1);
46  $_v_EndEvent_2->addDetector($_v_EndEvent_2_detector);
47  $_v_InclusiveGateway_1_emitter = new ilActivationEmitter($_v_InclusiveGateway_1);
48  $_v_InclusiveGateway_1_emitter->setName('$_v_InclusiveGateway_1_emitter');
49  $_v_InclusiveGateway_1_emitter->setTargetDetector($_v_EndEvent_2_detector);
50  $_v_InclusiveGateway_1->addEmitter($_v_InclusiveGateway_1_emitter);
51 
52  $_v_InclusiveGateway_1_detector = new ilSimpleDetector($_v_InclusiveGateway_1);
53  $_v_InclusiveGateway_1_detector->setName('$_v_InclusiveGateway_1_detector');
54  $_v_InclusiveGateway_1_detector->setSourceNode($_v_ParallelGateway_1);
55  $_v_InclusiveGateway_1->addDetector($_v_InclusiveGateway_1_detector);
56  $_v_ParallelGateway_1_emitter = new ilActivationEmitter($_v_ParallelGateway_1);
57  $_v_ParallelGateway_1_emitter->setName('$_v_ParallelGateway_1_emitter');
58  $_v_ParallelGateway_1_emitter->setTargetDetector($_v_InclusiveGateway_1_detector);
59  $_v_ParallelGateway_1->addEmitter($_v_ParallelGateway_1_emitter);
60 
61  $_v_InclusiveGateway_1_detector = new ilSimpleDetector($_v_InclusiveGateway_1);
62  $_v_InclusiveGateway_1_detector->setName('$_v_InclusiveGateway_1_detector');
63  $_v_InclusiveGateway_1_detector->setSourceNode($_v_ParallelGateway_1);
64  $_v_InclusiveGateway_1->addDetector($_v_InclusiveGateway_1_detector);
65  $_v_ParallelGateway_1_emitter = new ilActivationEmitter($_v_ParallelGateway_1);
66  $_v_ParallelGateway_1_emitter->setName('$_v_ParallelGateway_1_emitter');
67  $_v_ParallelGateway_1_emitter->setTargetDetector($_v_InclusiveGateway_1_detector);
68  $_v_ParallelGateway_1->addEmitter($_v_ParallelGateway_1_emitter);
69 
70  $_v_InclusiveGateway_1_detector = new ilSimpleDetector($_v_InclusiveGateway_1);
71  $_v_InclusiveGateway_1_detector->setName('$_v_InclusiveGateway_1_detector');
72  $_v_InclusiveGateway_1_detector->setSourceNode($_v_ParallelGateway_1);
73  $_v_InclusiveGateway_1->addDetector($_v_InclusiveGateway_1_detector);
74  $_v_ParallelGateway_1_emitter = new ilActivationEmitter($_v_ParallelGateway_1);
75  $_v_ParallelGateway_1_emitter->setName('$_v_ParallelGateway_1_emitter');
76  $_v_ParallelGateway_1_emitter->setTargetDetector($_v_InclusiveGateway_1_detector);
77  $_v_ParallelGateway_1->addEmitter($_v_ParallelGateway_1_emitter);
78 
79  }
80  }
81 
82 ?>
PhpIncludeInspection
PhpIncludeInspection
addNode(ilNode $node)
This method adds a node to the workflow.
PhpIncludeInspection
setStartNode(ilNode $node)
Sets the start node of the workflow.
PhpIncludeInspection