ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
EndEvent_Message_Simple_goldsample.php
Go to the documentation of this file.
1<?php
2require_once './Services/WorkflowEngine/classes/workflows/class.ilBaseWorkflow.php';
3require_once './Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
4require_once './Services/WorkflowEngine/classes/activities/class.ilEventRaisingActivity.php';
5require_once './Services/WorkflowEngine/classes/emitters/class.ilActivationEmitter.php';
6require_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_EndEvent_2_throwEventActivity = new ilEventRaisingActivity($_v_EndEvent_2);
27 $_v_EndEvent_2_throwEventActivity->setName('$_v_EndEvent_2_throwEventActivity');
28 $_v_EndEvent_2_throwEventActivity->setEventType("Course");
29 $_v_EndEvent_2_throwEventActivity->setEventName("UserWasAssigned");
30 $_v_EndEvent_2->addActivity($_v_EndEvent_2_throwEventActivity);
31
32 $_v_EndEvent_2_detector = new ilSimpleDetector($_v_EndEvent_2);
33 $_v_EndEvent_2_detector->setName('$_v_EndEvent_2_detector');
34 $_v_EndEvent_2_detector->setSourceNode($_v_StartEvent_1);
35 $_v_EndEvent_2->addDetector($_v_EndEvent_2_detector);
36 $_v_StartEvent_1_emitter = new ilActivationEmitter($_v_StartEvent_1);
37 $_v_StartEvent_1_emitter->setName('$_v_StartEvent_1_emitter');
38 $_v_StartEvent_1_emitter->setTargetDetector($_v_EndEvent_2_detector);
39 $_v_StartEvent_1->addEmitter($_v_StartEvent_1_emitter);
40
41 }
42
43
44 public static function getMessageDefinition($id)
45 {
46 $definitions = array( 'Message_1' => array(
47 'name' => 'Message',
48 'content' => '')
49 );
50 return $definitions[$id];
51 }
52
53
54 }
55
56?>
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
setStartNode(ilNode $node)
Sets the start node of the workflow.
addNode(ilNode $node)
This method adds a node to the workflow.
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
if(!array_key_exists('StateId', $_REQUEST)) $id