ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
StartEvent_MultiStart_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.ilEventDetector.php';
5 
7  {
8 
9  public static $startEventRequired = true;
10 
11  public static function getStartEventInfo()
12  {
13  $events[] = array(
14  'type' => 'time_passed',
15  'content' => 'time_passed',
16  'subject_type' => 'none',
17  'subject_id' => '0',
18  'context_type' => 'none',
19  'context_id' => '0',
20  );
21 
22  $events[] = array(
23  'type' => 'Test',
24  'content' => 'UserFailedTest',
25  'subject_type' => 'usr',
26  'subject_id' => '0',
27  'context_type' => 'obj',
28  'context_id' => '0',
29  );
30 
31  return $events;
32  }
33 
34  public function __construct()
35  {
36 
37  $_v_StartEvent_1 = new ilBasicNode($this);
38  $this->addNode($_v_StartEvent_1);
39  $_v_StartEvent_1->setName('$_v_StartEvent_1');
40 
41  $_v_StartEvent_1_detector = new ilEventDetector($_v_StartEvent_1);
42  $_v_StartEvent_1_detector->setName('$_v_StartEvent_1_detector');
43  $_v_StartEvent_1_detector->setEvent( "time_passed", "time_passed");
44  $_v_StartEvent_1_detector->setEventSubject( "none", "0");
45  $_v_StartEvent_1_detector->setEventContext( "none", "0");
46  $_v_StartEvent_1_detector->setListeningTimeframe(1399889594, 0);
47  $_v_StartEvent_2 = new ilBasicNode($this);
48  $this->addNode($_v_StartEvent_2);
49  $_v_StartEvent_2->setName('$_v_StartEvent_2');
50 
51  $_v_StartEvent_2_detector = new ilEventDetector($_v_StartEvent_2);
52  $_v_StartEvent_2_detector->setName('$_v_StartEvent_2_detector');
53  $_v_StartEvent_2_detector->setEvent( "Test", "UserFailedTest");
54  $_v_StartEvent_2_detector->setEventSubject( "usr", "0");
55  $_v_StartEvent_2_detector->setEventContext( "obj", "0");
56 
57  $_v_StartEvent_3 = new ilBasicNode($this);
58  $this->addNode($_v_StartEvent_3);
59  $_v_StartEvent_3->setName('$_v_StartEvent_3');
60 
61  $this->setStartNode($_v_StartEvent_3);
62 
63  }
64  }
65 
66 ?>
PhpIncludeInspection
addNode(ilNode $node)
This method adds a node to the workflow.
PhpIncludeInspection
Create styles array
The data for the language used.
setStartNode(ilNode $node)
Sets the start node of the workflow.
PhpIncludeInspection