ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Task_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/emitters/class.ilActivationEmitter.php';
5 require_once './Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
6 
7  class Task_Simple extends ilBaseWorkflow
8  {
9 
10  public static $startEventRequired = false;
11 
12  public function __construct()
13  {
14 
15  $_v_StartEvent_2 = new ilBasicNode($this);
16  $this->addNode($_v_StartEvent_2);
17  $_v_StartEvent_2->setName('$_v_StartEvent_2');
18 
19  $this->setStartNode($_v_StartEvent_2);
20 
21  $_v_Task_1 = new ilBasicNode($this);
22  $this->addNode($_v_Task_1);
23  $_v_Task_1->setName('$_v_Task_1');
24 
25  $_v_EndEvent_2 = new ilBasicNode($this);
26  $this->addNode($_v_EndEvent_2);
27  $_v_EndEvent_2->setName('$_v_EndEvent_2');
28 
29  $_v_Task_1_detector = new ilSimpleDetector($_v_Task_1);
30  $_v_Task_1_detector->setName('$_v_Task_1_detector');
31  $_v_Task_1_detector->setSourceNode($_v_StartEvent_2);
32  $_v_Task_1->addDetector($_v_Task_1_detector);
33  $_v_StartEvent_2_emitter = new ilActivationEmitter($_v_StartEvent_2);
34  $_v_StartEvent_2_emitter->setName('$_v_StartEvent_2_emitter');
35  $_v_StartEvent_2_emitter->setTargetDetector($_v_Task_1_detector);
36  $_v_StartEvent_2->addEmitter($_v_StartEvent_2_emitter);
37 
38  $_v_EndEvent_2_detector = new ilSimpleDetector($_v_EndEvent_2);
39  $_v_EndEvent_2_detector->setName('$_v_EndEvent_2_detector');
40  $_v_EndEvent_2_detector->setSourceNode($_v_Task_1);
41  $_v_EndEvent_2->addDetector($_v_EndEvent_2_detector);
42  $_v_Task_1_emitter = new ilActivationEmitter($_v_Task_1);
43  $_v_Task_1_emitter->setName('$_v_Task_1_emitter');
44  $_v_Task_1_emitter->setTargetDetector($_v_EndEvent_2_detector);
45  $_v_Task_1->addEmitter($_v_Task_1_emitter);
46 
47  }
48  }
49 
50 ?>
PhpIncludeInspection
addNode(ilNode $node)
This method adds a node to the workflow.
PhpIncludeInspection
setStartNode(ilNode $node)
Sets the start node of the workflow.
PhpIncludeInspection