ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilIntermediateCatchEventElement Class Reference

Class ilIntermediateCatchEventElement. More...

+ Inheritance diagram for ilIntermediateCatchEventElement:
+ Collaboration diagram for ilIntermediateCatchEventElement:

Public Member Functions

 getPHP ($element, ilWorkflowScaffold $class_object)
 
- Public Member Functions inherited from ilBaseElement
 getBpmn2Array ()
 
 setBpmn2Array ($bpmn2_array)
 
 handleDataAssociations ($element, $class_object, $element_varname)
 
 getDataInputAssociationIdentifiers ($element)
 
 getDataOutputAssociationIdentifiers ($element)
 

Data Fields

 $element_varname
 

Additional Inherited Members

- Protected Attributes inherited from ilBaseElement
 $bpmn2_array
 

Detailed Description

Member Function Documentation

◆ getPHP()

ilIntermediateCatchEventElement::getPHP (   $element,
ilWorkflowScaffold  $class_object 
)
Parameters
$element
\ilWorkflowScaffold$class_object
Returns
string

Definition at line 23 of file class.ilIntermediateCatchEventElement.php.

References $code, ilBPMN2ParserUtils\extractILIASEventDefinitionFromProcess(), ilBPMN2ParserUtils\extractTimeDateEventDefinitionFromElement(), ilBaseElement\handleDataAssociations(), ilWorkflowScaffold\registerRequire(), and ilBPMN2ParserUtils\xsIDToPHPVarname().

24  {
25  $code = "";
26  $element_id = ilBPMN2ParserUtils::xsIDToPHPVarname($element['attributes']['id']);
27  $this->element_varname = '$_v_' . $element_id;
28 
29  $event_definition = null;
30  if (count($element['children'])) {
31  foreach ($element['children'] as $child) {
32  if ($child['name'] == 'messageEventDefinition') {
34  $child['attributes']['messageRef'],
35  'message',
36  $this->bpmn2_array
37  );
38  }
39  if ($child['name'] == 'signalEventDefinition') {
41  $child['attributes']['signalRef'],
42  'signal',
43  $this->bpmn2_array
44  );
45  }
46  if ($child['name'] == 'timerEventDefinition') {
48  $child['attributes']['id'],
49  'intermediateCatchEvent',
50  $this->bpmn2_array
51  );
52  }
53  }
54  }
55 
56  $class_object->registerRequire('./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php');
57  $code .= '
58  ' . $this->element_varname . ' = new ilBasicNode($this);
59  $this->addNode(' . $this->element_varname . ');
60  ' . $this->element_varname . '->setName(\'' . $this->element_varname . '\');
61  ';
62 
63  if (is_array($event_definition)) {
64  $class_object->registerRequire('./Services/WorkflowEngine/classes/detectors/class.ilEventDetector.php');
65  $code .= '
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'] . '");
71  ';
72 
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'] . ');';
79  }
80 
81  $code .= '
82  ' . $this->element_varname . '->addDetector(' . $this->element_varname . '_detector);
83  ';
84  }
85 
86  $code .= $this->handleDataAssociations($element, $class_object, $this->element_varname);
87 
88  return $code;
89  }
static extractILIASEventDefinitionFromProcess($start_event_ref, $type, $bpmn2_array)
handleDataAssociations($element, $class_object, $element_varname)
$code
Definition: example_050.php:99
static extractTimeDateEventDefinitionFromElement($start_event_ref, $type, $bpmn2_array)
PhpIncludeInspection
Class ilCertificateAppEventListener.
+ Here is the call graph for this function:

Field Documentation

◆ $element_varname

ilIntermediateCatchEventElement::$element_varname

Definition at line 15 of file class.ilIntermediateCatchEventElement.php.


The documentation for this class was generated from the following file: