ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilEndEventElement Class Reference

Class ilEndEventElement. More...

+ Inheritance diagram for ilEndEventElement:
+ Collaboration diagram for ilEndEventElement:

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

Class ilEndEventElement.

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

/

Definition at line 12 of file class.ilEndEventElement.php.

Member Function Documentation

◆ getPHP()

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

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

24 {
25 $code = "";
26 $element_id = ilBPMN2ParserUtils::xsIDToPHPVarname($element['attributes']['id']);
27 $this->element_varname = '$_v_'.$element_id;
28
29 $event_definition = null;
30
31 $terminate = false;
32
33 if(count($element['children']))
34 {
35 foreach ($element['children'] as $child)
36 {
37 if($child['name'] == 'messageEventDefinition')
38 {
40 $child['attributes']['messageRef'], 'message', $this->bpmn2_array);
41 }
42 if($child['name'] == 'signalEventDefinition')
43 {
45 $child['attributes']['signalRef'], 'signal', $this->bpmn2_array);
46 }
47 if($child['name'] == 'terminateEventDefinition')
48 {
49 $terminate = true;
50 }
51 }
52 }
53
54 $class_object->registerRequire('./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php');
55 $code .= '
56 ' . $this->element_varname . ' = new ilBasicNode($this);
57 $this->addNode(' . $this->element_varname . ');
58 ' . $this->element_varname . '->setName(\'' . $this->element_varname . '\');
59 ';
60
61 if(isset($event_definition['type']) && isset($event_definition['content']))
62 {
63 $class_object->registerRequire('./Services/WorkflowEngine/classes/activities/class.ilEventRaisingActivity.php');
64 $code .= '
65 ' . $this->element_varname . '_throwEventActivity = new ilEventRaisingActivity(' . $this->element_varname . ');
66 ' . $this->element_varname . '_throwEventActivity->setName(\'' . $this->element_varname . '_throwEventActivity\');
67 ' . $this->element_varname . '_throwEventActivity->setEventType("'.$event_definition['type'].'");
68 ' . $this->element_varname . '_throwEventActivity->setEventName("'.$event_definition['content'].'");
69 ' . $this->element_varname . '->addActivity(' . $this->element_varname . '_throwEventActivity);
70 ';
71 }
72
73 if($terminate)
74 {
75 $class_object->registerRequire('./Services/WorkflowEngine/classes/activities/class.ilStopWorkflowActivity.php');
76 $code .= '
77 ' . $this->element_varname . '_terminationEventActivity = new ilStopWorkflowActivity(' . $this->element_varname . ');
78 ' . $this->element_varname . '->addActivity(' . $this->element_varname . '_terminationEventActivity);
79 ';
80 }
81
82 $code .= $this->handleDataAssociations($element, $class_object, $this->element_varname);
83
84 return $code;
85 }
static extractILIASEventDefinitionFromProcess($start_event_ref, $type, $bpmn2_array)
handleDataAssociations($element, $class_object, $element_varname)
@noinspection PhpIncludeInspection
$code
Definition: example_050.php:99
Class ilRuntime.

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

+ Here is the call graph for this function:

Field Documentation

◆ $element_varname

string ilEndEventElement::$element_varname

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


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