27 $this->element_varname =
'$_v_'.$element_id;
29 $event_definition = null;
30 if(count($element[
'children']))
32 foreach ($element[
'children'] as $child)
34 if($child[
'name'] ==
'messageEventDefinition')
37 $child[
'attributes'][
'messageRef'],
'message', $this->bpmn2_array
40 if($child[
'name'] ==
'signalEventDefinition')
43 $child[
'attributes'][
'signalRef'],
'signal', $this->bpmn2_array
46 if($child[
'name'] ==
'timerEventDefinition')
49 $child[
'attributes'][
'id'],
'intermediateCatchEvent', $this->bpmn2_array
55 $class_object->
registerRequire(
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php');
57 ' . $this->element_varname .
' = new ilBasicNode($this); 58 $this->addNode(' . $this->element_varname .
'); 59 ' . $this->element_varname .
'->setName(\'' . $this->element_varname .
'\');
62 if(is_array($event_definition)) 64 $class_object->registerRequire('./
Services/WorkflowEngine/classes/detectors/
class.ilEventDetector.php
'); 66 ' . $this->element_varname . '_detector =
new ilEventDetector(
' . $this->element_varname . ');
67 ' . $this->element_varname . '_detector->setName(\
'' . $this->element_varname .
'_detector\'); 68 ' . $this->element_varname .
'_detector->setEvent( "'.$event_definition[
'type'].
'", "'.$event_definition[
'content'].
'"); 69 ' . $this->element_varname .
'_detector->setEventSubject( "'.$event_definition[
'subject_type'].
'", "'.$event_definition[
'subject_id'].
'"); 70 ' . $this->element_varname .
'_detector->setEventContext( "'.$event_definition[
'context_type'].
'", "'.$event_definition[
'context_id'].
'"); 73 if(isset($event_definition[
'listening_start']) || isset($event_definition[
'listening_end']))
75 $code .= $this->element_varname .
'_detector->setListeningTimeframe(' .(int) $event_definition[
'listening_start'] .
76 ', ' . (
int) $event_definition[
'listening_end'] .
');';
78 else if(isset($event_definition[
'listening_relative']) && isset($event_definition[
'listening_interval']))
80 $code .= $this->element_varname .
'_detector->setTimerRelative(true);';
81 $code .= $this->element_varname .
'_detector->setTimerLimit(' .(int) $event_definition[
'listening_interval'] .
');';
85 ' . $this->element_varname .
'->addDetector(' . $this->element_varname .
'_detector); static xsIDToPHPVarname($xsID)
static extractILIASEventDefinitionFromProcess($start_event_ref, $type, $bpmn2_array)
Class ilWorkflowScaffold.
handleDataAssociations($element, $class_object, $element_varname)
registerRequire($require)
static extractTimeDateEventDefinitionFromElement($start_event_ref, $type, $bpmn2_array)