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/detectors/class.ilEventDetector.php'; 5require_once './Services/WorkflowEngine/classes/nodes/class.ilCaseNode.php'; 6require_once './Services/WorkflowEngine/classes/emitters/class.ilActivationEmitter.php'; 7require_once './Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php'; 8 9 class EventBasedGateway_Blanko_Simple extends ilBaseWorkflow 10 { 11 12 public static $startEventRequired = false; 13 14 public function __construct() 15 { 16 17 $_v_EventBasedGateway_1 = new ilBasicNode($this); 18 $_v_EventBasedGateway_1->setName('$_v_EventBasedGateway_1'); 19 $_v_EventBasedGateway_1->setIsForwardConditionNode(true); 20 $this->addNode($_v_EventBasedGateway_1); 21 22 $_v_IntermediateCatchEvent_1 = new ilBasicNode($this); 23 $this->addNode($_v_IntermediateCatchEvent_1); 24 $_v_IntermediateCatchEvent_1->setName('$_v_IntermediateCatchEvent_1'); 25 26 $_v_IntermediateCatchEvent_1_detector = new ilEventDetector($_v_IntermediateCatchEvent_1); 27 $_v_IntermediateCatchEvent_1_detector->setName('$_v_IntermediateCatchEvent_1_detector'); 28 $_v_IntermediateCatchEvent_1_detector->setEvent( "Course", "UserWasAssigned"); 29 $_v_IntermediateCatchEvent_1_detector->setEventSubject( "usr", "0"); 30 $_v_IntermediateCatchEvent_1_detector->setEventContext( "crs", "0"); 31 $_v_IntermediateCatchEvent_1_detector->setListeningTimeframe(0, 0); 32 $_v_IntermediateCatchEvent_1->addDetector($_v_IntermediateCatchEvent_1_detector); 33 34 $_v_IntermediateCatchEvent_2 = new ilBasicNode($this); 35 $this->addNode($_v_IntermediateCatchEvent_2); 36 $_v_IntermediateCatchEvent_2->setName('$_v_IntermediateCatchEvent_2'); 37 38 $_v_IntermediateCatchEvent_2_detector = new ilEventDetector($_v_IntermediateCatchEvent_2); 39 $_v_IntermediateCatchEvent_2_detector->setName('$_v_IntermediateCatchEvent_2_detector'); 40 $_v_IntermediateCatchEvent_2_detector->setEvent( "Course", "UserWasDeassigned"); 41 $_v_IntermediateCatchEvent_2_detector->setEventSubject( "usr", "0"); 42 $_v_IntermediateCatchEvent_2_detector->setEventContext( "crs", "0"); 43 $_v_IntermediateCatchEvent_2_detector->setListeningTimeframe(0, 0); 44 $_v_IntermediateCatchEvent_2->addDetector($_v_IntermediateCatchEvent_2_detector); 45 46 $_v_IntermediateCatchEvent_3 = new ilBasicNode($this); 47 $this->addNode($_v_IntermediateCatchEvent_3); 48 $_v_IntermediateCatchEvent_3->setName('$_v_IntermediateCatchEvent_3'); 49 50 $_v_IntermediateCatchEvent_3_detector = new ilEventDetector($_v_IntermediateCatchEvent_3); 51 $_v_IntermediateCatchEvent_3_detector->setName('$_v_IntermediateCatchEvent_3_detector'); 52 $_v_IntermediateCatchEvent_3_detector->setEvent( "Course", "UserAassignmentChanged"); 53 $_v_IntermediateCatchEvent_3_detector->setEventSubject( "usr", "0"); 54 $_v_IntermediateCatchEvent_3_detector->setEventContext( "crs", "0"); 55 $_v_IntermediateCatchEvent_3_detector->setListeningTimeframe(0, 0); 56 $_v_IntermediateCatchEvent_3->addDetector($_v_IntermediateCatchEvent_3_detector); 57 58 $_v_StartEvent_1 = new ilBasicNode($this); 59 $this->addNode($_v_StartEvent_1); 60 $_v_StartEvent_1->setName('$_v_StartEvent_1'); 61 62 $this->setStartNode($_v_StartEvent_1); 63 64 $_v_ExclusiveGateway_1 = new ilCaseNode($this); 65 $_v_ExclusiveGateway_1->setName('$_v_ExclusiveGateway_1'); 66 $_v_ExclusiveGateway_1->setIsExclusiveJoin(true); 67 $this->addNode($_v_ExclusiveGateway_1); 68 69 $_v_EndEvent_1 = new ilBasicNode($this); 70 $this->addNode($_v_EndEvent_1); 71 $_v_EndEvent_1->setName('$_v_EndEvent_1'); 72 73 $_v_IntermediateCatchEvent_1_detector = new ilSimpleDetector($_v_IntermediateCatchEvent_1); 74 $_v_IntermediateCatchEvent_1_detector->setName('$_v_IntermediateCatchEvent_1_detector'); 75 $_v_IntermediateCatchEvent_1_detector->setSourceNode($_v_EventBasedGateway_1); 76 $_v_IntermediateCatchEvent_1->addDetector($_v_IntermediateCatchEvent_1_detector); 77 $_v_EventBasedGateway_1_emitter = new ilActivationEmitter($_v_EventBasedGateway_1); 78 $_v_EventBasedGateway_1_emitter->setName('$_v_EventBasedGateway_1_emitter'); 79 $_v_EventBasedGateway_1_emitter->setTargetDetector($_v_IntermediateCatchEvent_1_detector); 80 $_v_EventBasedGateway_1->addEmitter($_v_EventBasedGateway_1_emitter); 81 82 $_v_IntermediateCatchEvent_2_detector = new ilSimpleDetector($_v_IntermediateCatchEvent_2); 83 $_v_IntermediateCatchEvent_2_detector->setName('$_v_IntermediateCatchEvent_2_detector'); 84 $_v_IntermediateCatchEvent_2_detector->setSourceNode($_v_EventBasedGateway_1); 85 $_v_IntermediateCatchEvent_2->addDetector($_v_IntermediateCatchEvent_2_detector); 86 $_v_EventBasedGateway_1_emitter = new ilActivationEmitter($_v_EventBasedGateway_1); 87 $_v_EventBasedGateway_1_emitter->setName('$_v_EventBasedGateway_1_emitter'); 88 $_v_EventBasedGateway_1_emitter->setTargetDetector($_v_IntermediateCatchEvent_2_detector); 89 $_v_EventBasedGateway_1->addEmitter($_v_EventBasedGateway_1_emitter); 90 91 $_v_IntermediateCatchEvent_3_detector = new ilSimpleDetector($_v_IntermediateCatchEvent_3); 92 $_v_IntermediateCatchEvent_3_detector->setName('$_v_IntermediateCatchEvent_3_detector'); 93 $_v_IntermediateCatchEvent_3_detector->setSourceNode($_v_EventBasedGateway_1); 94 $_v_IntermediateCatchEvent_3->addDetector($_v_IntermediateCatchEvent_3_detector); 95 $_v_EventBasedGateway_1_emitter = new ilActivationEmitter($_v_EventBasedGateway_1); 96 $_v_EventBasedGateway_1_emitter->setName('$_v_EventBasedGateway_1_emitter'); 97 $_v_EventBasedGateway_1_emitter->setTargetDetector($_v_IntermediateCatchEvent_3_detector); 98 $_v_EventBasedGateway_1->addEmitter($_v_EventBasedGateway_1_emitter); 99 100 $_v_EventBasedGateway_1_detector = new ilSimpleDetector($_v_EventBasedGateway_1); 101 $_v_EventBasedGateway_1_detector->setName('$_v_EventBasedGateway_1_detector'); 102 $_v_EventBasedGateway_1_detector->setSourceNode($_v_StartEvent_1); 103 $_v_EventBasedGateway_1->addDetector($_v_EventBasedGateway_1_detector); 104 $_v_StartEvent_1_emitter = new ilActivationEmitter($_v_StartEvent_1); 105 $_v_StartEvent_1_emitter->setName('$_v_StartEvent_1_emitter'); 106 $_v_StartEvent_1_emitter->setTargetDetector($_v_EventBasedGateway_1_detector); 107 $_v_StartEvent_1->addEmitter($_v_StartEvent_1_emitter); 108 109 $_v_ExclusiveGateway_1_detector = new ilSimpleDetector($_v_ExclusiveGateway_1); 110 $_v_ExclusiveGateway_1_detector->setName('$_v_ExclusiveGateway_1_detector'); 111 $_v_ExclusiveGateway_1_detector->setSourceNode($_v_IntermediateCatchEvent_1); 112 $_v_ExclusiveGateway_1->addDetector($_v_ExclusiveGateway_1_detector); 113 $_v_IntermediateCatchEvent_1_emitter = new ilActivationEmitter($_v_IntermediateCatchEvent_1); 114 $_v_IntermediateCatchEvent_1_emitter->setName('$_v_IntermediateCatchEvent_1_emitter'); 115 $_v_IntermediateCatchEvent_1_emitter->setTargetDetector($_v_ExclusiveGateway_1_detector); 116 $_v_IntermediateCatchEvent_1->addEmitter($_v_IntermediateCatchEvent_1_emitter); 117 118 $_v_ExclusiveGateway_1_detector = new ilSimpleDetector($_v_ExclusiveGateway_1); 119 $_v_ExclusiveGateway_1_detector->setName('$_v_ExclusiveGateway_1_detector'); 120 $_v_ExclusiveGateway_1_detector->setSourceNode($_v_IntermediateCatchEvent_2); 121 $_v_ExclusiveGateway_1->addDetector($_v_ExclusiveGateway_1_detector); 122 $_v_IntermediateCatchEvent_2_emitter = new ilActivationEmitter($_v_IntermediateCatchEvent_2); 123 $_v_IntermediateCatchEvent_2_emitter->setName('$_v_IntermediateCatchEvent_2_emitter'); 124 $_v_IntermediateCatchEvent_2_emitter->setTargetDetector($_v_ExclusiveGateway_1_detector); 125 $_v_IntermediateCatchEvent_2->addEmitter($_v_IntermediateCatchEvent_2_emitter); 126 127 $_v_ExclusiveGateway_1_detector = new ilSimpleDetector($_v_ExclusiveGateway_1); 128 $_v_ExclusiveGateway_1_detector->setName('$_v_ExclusiveGateway_1_detector'); 129 $_v_ExclusiveGateway_1_detector->setSourceNode($_v_IntermediateCatchEvent_3); 130 $_v_ExclusiveGateway_1->addDetector($_v_ExclusiveGateway_1_detector); 131 $_v_IntermediateCatchEvent_3_emitter = new ilActivationEmitter($_v_IntermediateCatchEvent_3); 132 $_v_IntermediateCatchEvent_3_emitter->setName('$_v_IntermediateCatchEvent_3_emitter'); 133 $_v_IntermediateCatchEvent_3_emitter->setTargetDetector($_v_ExclusiveGateway_1_detector); 134 $_v_IntermediateCatchEvent_3->addEmitter($_v_IntermediateCatchEvent_3_emitter); 135 136 $_v_EndEvent_1_detector = new ilSimpleDetector($_v_EndEvent_1); 137 $_v_EndEvent_1_detector->setName('$_v_EndEvent_1_detector'); 138 $_v_EndEvent_1_detector->setSourceNode($_v_ExclusiveGateway_1); 139 $_v_EndEvent_1->addDetector($_v_EndEvent_1_detector); 140 $_v_ExclusiveGateway_1_emitter = new ilActivationEmitter($_v_ExclusiveGateway_1); 141 $_v_ExclusiveGateway_1_emitter->setName('$_v_ExclusiveGateway_1_emitter'); 142 $_v_ExclusiveGateway_1_emitter->setTargetDetector($_v_EndEvent_1_detector); 143 $_v_ExclusiveGateway_1->addEmitter($_v_ExclusiveGateway_1_emitter); 144 145 } 146 } 147 148?>