ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Data_Wiring_Input_Task_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.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  $this->defineInstanceVar("DataInput_1", "user_id", false, "", "mixed", "undefined" );
17  $this->registerInputVar("DataInput_1", array());
18 
19  $_v_StartEvent_1 = new ilBasicNode($this);
20  $this->addNode($_v_StartEvent_1);
21  $_v_StartEvent_1->setName('$_v_StartEvent_1');
22 
23  $this->setStartNode($_v_StartEvent_1);
24 
25  $_v_Task_1 = new ilBasicNode($this);
26  $this->addNode($_v_Task_1);
27  $_v_Task_1->setName('$_v_Task_1');
28 
29  $_v_Task_1_inputDataDetector = new ilDataDetector($_v_Task_1);
30  $_v_Task_1_inputDataDetector->setVarName("DataInput_1");
31  $_v_Task_1_inputDataDetector->setName($_v_Task_1_inputDataDetector);
32  $_v_Task_1->addDetector($_v_Task_1_inputDataDetector);
33 
34  $_v_EndEvent_1 = new ilBasicNode($this);
35  $this->addNode($_v_EndEvent_1);
36  $_v_EndEvent_1->setName('$_v_EndEvent_1');
37 
38  $_v_Task_1_detector = new ilSimpleDetector($_v_Task_1);
39  $_v_Task_1_detector->setName('$_v_Task_1_detector');
40  $_v_Task_1_detector->setSourceNode($_v_StartEvent_1);
41  $_v_Task_1->addDetector($_v_Task_1_detector);
42  $_v_StartEvent_1_emitter = new ilActivationEmitter($_v_StartEvent_1);
43  $_v_StartEvent_1_emitter->setName('$_v_StartEvent_1_emitter');
44  $_v_StartEvent_1_emitter->setTargetDetector($_v_Task_1_detector);
45  $_v_StartEvent_1->addEmitter($_v_StartEvent_1_emitter);
46 
47  $_v_EndEvent_1_detector = new ilSimpleDetector($_v_EndEvent_1);
48  $_v_EndEvent_1_detector->setName('$_v_EndEvent_1_detector');
49  $_v_EndEvent_1_detector->setSourceNode($_v_Task_1);
50  $_v_EndEvent_1->addDetector($_v_EndEvent_1_detector);
51  $_v_Task_1_emitter = new ilActivationEmitter($_v_Task_1);
52  $_v_Task_1_emitter->setName('$_v_Task_1_emitter');
53  $_v_Task_1_emitter->setTargetDetector($_v_EndEvent_1_detector);
54  $_v_Task_1->addEmitter($_v_Task_1_emitter);
55 
56  }
57  }
58 
59 ?>
PhpIncludeInspection
PhpIncludeInspection
addNode(ilNode $node)
This method adds a node to the workflow.
defineInstanceVar( $id, $name, $reference=false, $reference_target='', $type='mixed', $role='undefined')
PhpIncludeInspection
Create styles array
The data for the language used.
registerInputVar($name, $definition)
setStartNode(ilNode $node)
Sets the start node of the workflow.
PhpIncludeInspection