ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
DataObject_Wiring_Input_Object_Output_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/detectors/class.ilDataDetector.php';
5 require_once './Services/WorkflowEngine/classes/emitters/class.ilDataEmitter.php';
6 require_once './Services/WorkflowEngine/classes/emitters/class.ilActivationEmitter.php';
7 require_once './Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
8 
10  {
11 
12  public static $startEventRequired = false;
13 
14  public function __construct()
15  {
16 
17  $this->defineInstanceVar("DataInput_1", "ioval1", false, "", "mixed", "undefined" );
18  $this->registerInputVar("DataInput_1", array());
19 
20  $this->defineInstanceVar("DataOutput_1","ioval1" );
21  $this->registerOutputVar("DataOutput_1");
22 
23  $_v_Task_1 = new ilBasicNode($this);
24  $this->addNode($_v_Task_1);
25  $_v_Task_1->setName('$_v_Task_1');
26 
27  $_v_Task_1_inputDataDetector = new ilDataDetector($_v_Task_1);
28  $_v_Task_1_inputDataDetector->setVarName("DataInput_1");
29  $_v_Task_1_inputDataDetector->setName($_v_Task_1_inputDataDetector);
30  $_v_Task_1->addDetector($_v_Task_1_inputDataDetector);
31 
32  $_v_Task_1_outputDataEmitter = new ilDataEmitter($_v_Task_1);
33  $_v_Task_1_outputDataEmitter->setVarName("DataObjectReference_1");
34  $_v_Task_1_outputDataEmitter->setName($_v_Task_1_outputDataEmitter);
35  $_v_Task_1->addEmitter($_v_Task_1_outputDataEmitter);
36 
37  $this->defineInstanceVar("DataObject_1","dataObject", false, "", "mixed", "undefined" );
38 
39  $this->defineInstanceVar("DataObjectReference_1","ioval1", true, "DataObject_1" );
40 
41  $_v_Task_2 = new ilBasicNode($this);
42  $this->addNode($_v_Task_2);
43  $_v_Task_2->setName('$_v_Task_2');
44 
45  $_v_Task_2_inputDataDetector = new ilDataDetector($_v_Task_2);
46  $_v_Task_2_inputDataDetector->setVarName("DataObjectReference_1");
47  $_v_Task_2_inputDataDetector->setName($_v_Task_2_inputDataDetector);
48  $_v_Task_2->addDetector($_v_Task_2_inputDataDetector);
49 
50  $_v_Task_2_outputDataEmitter = new ilDataEmitter($_v_Task_2);
51  $_v_Task_2_outputDataEmitter->setVarName("DataOutput_1");
52  $_v_Task_2_outputDataEmitter->setName($_v_Task_2_outputDataEmitter);
53  $_v_Task_2->addEmitter($_v_Task_2_outputDataEmitter);
54 
55  $_v_EndEvent_1 = new ilBasicNode($this);
56  $this->addNode($_v_EndEvent_1);
57  $_v_EndEvent_1->setName('$_v_EndEvent_1');
58 
59  $_v_StartEvent_1 = new ilBasicNode($this);
60  $this->addNode($_v_StartEvent_1);
61  $_v_StartEvent_1->setName('$_v_StartEvent_1');
62 
63  $this->setStartNode($_v_StartEvent_1);
64 
65  $_v_Task_2_detector = new ilSimpleDetector($_v_Task_2);
66  $_v_Task_2_detector->setName('$_v_Task_2_detector');
67  $_v_Task_2_detector->setSourceNode($_v_Task_1);
68  $_v_Task_2->addDetector($_v_Task_2_detector);
69  $_v_Task_1_emitter = new ilActivationEmitter($_v_Task_1);
70  $_v_Task_1_emitter->setName('$_v_Task_1_emitter');
71  $_v_Task_1_emitter->setTargetDetector($_v_Task_2_detector);
72  $_v_Task_1->addEmitter($_v_Task_1_emitter);
73 
74  $_v_EndEvent_1_detector = new ilSimpleDetector($_v_EndEvent_1);
75  $_v_EndEvent_1_detector->setName('$_v_EndEvent_1_detector');
76  $_v_EndEvent_1_detector->setSourceNode($_v_Task_2);
77  $_v_EndEvent_1->addDetector($_v_EndEvent_1_detector);
78  $_v_Task_2_emitter = new ilActivationEmitter($_v_Task_2);
79  $_v_Task_2_emitter->setName('$_v_Task_2_emitter');
80  $_v_Task_2_emitter->setTargetDetector($_v_EndEvent_1_detector);
81  $_v_Task_2->addEmitter($_v_Task_2_emitter);
82 
83  $_v_Task_1_detector = new ilSimpleDetector($_v_Task_1);
84  $_v_Task_1_detector->setName('$_v_Task_1_detector');
85  $_v_Task_1_detector->setSourceNode($_v_StartEvent_1);
86  $_v_Task_1->addDetector($_v_Task_1_detector);
87  $_v_StartEvent_1_emitter = new ilActivationEmitter($_v_StartEvent_1);
88  $_v_StartEvent_1_emitter->setName('$_v_StartEvent_1_emitter');
89  $_v_StartEvent_1_emitter->setTargetDetector($_v_Task_1_detector);
90  $_v_StartEvent_1->addEmitter($_v_StartEvent_1_emitter);
91 
92  }
93  }
94 
95 ?>
defineInstanceVar($id, $name, $reference=false, $reference_target='', $type='mixed', $role='undefined')
PhpIncludeInspection
PhpIncludeInspection
addNode(ilNode $node)
This method adds a node to the workflow.
PhpIncludeInspection
Create styles array
The data for the language used.
registerInputVar($name, $definition)
setStartNode(ilNode $node)
Sets the start node of the workflow.
PhpIncludeInspection
PhpIncludeInspection