27 $this->element_varname =
'$_v_' . $element_id;
29 $event_definition = null;
30 if (count($element[
'children'])) {
31 foreach ($element[
'children'] as $child) {
32 if ($child[
'name'] ==
'messageEventDefinition') {
34 $child[
'attributes'][
'messageRef'],
39 if ($child[
'name'] ==
'signalEventDefinition') {
41 $child[
'attributes'][
'signalRef'],
46 if ($child[
'name'] ==
'timerEventDefinition') {
48 $child[
'attributes'][
'id'],
49 'intermediateCatchEvent',
56 $class_object->
registerRequire(
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php');
58 ' . $this->element_varname .
' = new ilBasicNode($this); 59 $this->addNode(' . $this->element_varname .
'); 60 ' . $this->element_varname .
'->setName(\'' . $this->element_varname .
'\');
63 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'])) {
74 $code .= $this->element_varname .
'_detector->setListeningTimeframe(' . (int) $event_definition[
'listening_start'] .
75 ', ' . (
int) $event_definition[
'listening_end'] .
');';
76 } elseif (isset($event_definition[
'listening_relative']) && isset($event_definition[
'listening_interval'])) {
77 $code .= $this->element_varname .
'_detector->setTimerRelative(true);';
78 $code .= $this->element_varname .
'_detector->setTimerLimit(' . (int) $event_definition[
'listening_interval'] .
');';
82 ' . $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)
Class ilCertificateAppEventListener.