27 $this->element_varname =
'$_v_' . $element_id;
29 $event_definition = null;
31 $hasChildren = (isset($element[
'children']) && is_array($element[
'children']) && count($element[
'children']) > 0);
33 foreach ($element[
'children'] as $child) {
34 if ($child[
'name'] ==
'messageEventDefinition') {
37 $child[
'attributes'][
'messageRef'],
42 if ($child[
'name'] ==
'signalEventDefinition') {
45 $child[
'attributes'][
'signalRef'],
50 if ($child[
'name'] ==
'timerEventDefinition') {
53 $child[
'attributes'][
'id'],
61 $class_object->
registerRequire(
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php');
63 ' . $this->element_varname .
' = new ilBasicNode($this); 64 $this->addNode(' . $this->element_varname .
'); 65 ' . $this->element_varname .
'->setName(\'' . $this->element_varname .
'\');
68 if (is_array($event_definition)) { 69 $class_object->registerRequire('./
Services/WorkflowEngine/classes/detectors/
class.ilEventDetector.php
'); 71 ' . $this->element_varname . '_detector =
new ilEventDetector(
' . $this->element_varname . ');
72 ' . $this->element_varname . '_detector->setName(\
'' . $this->element_varname .
'_detector\'); 73 ' . $this->element_varname .
'_detector->setEvent( "' . $event_definition[
'type'] .
'", "' . $event_definition[
'content'] .
'"); 74 ' . $this->element_varname .
'_detector->setEventSubject( "' . $event_definition[
'subject_type'] .
'", "' . $event_definition[
'subject_id'] .
'"); 75 ' . $this->element_varname .
'_detector->setEventContext( "' . $event_definition[
'context_type'] .
'", "' . $event_definition[
'context_id'] .
'"); 77 if (isset($event_definition[
'listening_start']) || isset($event_definition[
'listening_end'])) {
78 $code .= $this->element_varname .
'_detector->setListeningTimeframe(' . (int) $event_definition[
'listening_start'] .
79 ', ' . (
int) $event_definition[
'listening_end'] .
');';
80 } elseif (isset($event_definition[
'listening_relative']) && isset($event_definition[
'listening_interval'])) {
81 $code .= $this->element_varname .
'_detector->setTimerRelative(true);';
82 $code .= $this->element_varname .
'_detector->setTimerLimit(' . (int) $event_definition[
'listening_interval'] .
');';
86 $this->setStartNode(' . $this->element_varname .
'); static xsIDToPHPVarname($xsID)
static extractILIASEventDefinitionFromProcess($start_event_ref, $type, $bpmn2_array)
Class ilWorkflowScaffold.
Class ilStartEventElement.
handleDataAssociations($element, $class_object, $element_varname)
registerStartTimerRef($start_event_ref)
getPHP($element, ilWorkflowScaffold $class_object)
registerStartSignalRef($start_event_ref)
registerStartEventRef($start_event_ref)
registerRequire($require)
static extractTimeDateEventDefinitionFromElement($start_event_ref, $type, $bpmn2_array)