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

Class ilReceiveTaskElement. More...

+ Inheritance diagram for ilReceiveTaskElement:
+ Collaboration diagram for ilReceiveTaskElement:

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 ilReceiveTaskElement.

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

/

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

Member Function Documentation

◆ getPHP()

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

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

References $code, ilBPMN2ParserUtils\extractILIASEventDefinitionFromProcess(), ilBPMN2ParserUtils\extractTimeDateEventDefinitionFromElement(), 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  {
32  foreach ($element['children'] as $child)
33  {
34  if($child['name'] == 'messageEventDefinition')
35  {
37  $child['attributes']['messageRef'], 'message', $this->bpmn2_array);
38  }
39  if($child['name'] == 'signalEventDefinition')
40  {
42  $child['attributes']['signalRef'], 'signal', $this->bpmn2_array);
43  }
44  if($child['name'] == 'timerEventDefinition')
45  {
47  $child['attributes']['id'], 'intermediateCatchEvent', $this->bpmn2_array);
48  }
49  }
50  }
51 
52  $class_object->registerRequire('./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php');
53  $code .= '
54  ' . $this->element_varname . ' = new ilBasicNode($this);
55  $this->addNode(' . $this->element_varname . ');
56  ' . $this->element_varname . '->setName(\'' . $this->element_varname . '\');
57  ';
58 
59  if(is_array($event_definition))
60  {
61  $class_object->registerRequire('./Services/WorkflowEngine/classes/detectors/class.ilEventDetector.php');
62  $code .= '
63  ' . $this->element_varname . '_detector = new ilEventDetector(' . $this->element_varname . ');
64  ' . $this->element_varname . '_detector->setName(\'' . $this->element_varname . '\');
65  ' . $this->element_varname . '_detector->setEvent( "'.$event_definition['type'].'", "'.$event_definition['content'].'");
66  ' . $this->element_varname . '_detector->setEventSubject( "'.$event_definition['subject_type'].'", "'.$event_definition['subject_id'].'");
67  ' . $this->element_varname . '_detector->setEventContext( "'.$event_definition['context_type'].'", "'.$event_definition['context_id'].'");
68  ';
69  if(isset($event_definition['listening_start']) || isset($event_definition['listening_end']))
70  {
71  $code .= $this->element_varname . '_detector->setListeningTimeframe(' .(int) $event_definition['listening_start'] .
72  ', ' . (int) $event_definition['listening_end'] . ');';
73  }
74  else if(isset($event_definition['listening_relative']) && isset($event_definition['listening_interval']))
75  {
76  $code .= $this->element_varname . '_detector->setTimerRelative(true);';
77  $code .= $this->element_varname . '_detector->setTimerLimit(' .(int) $event_definition['listening_interval'] . ');';
78  }
79  }
80 
81  $code .= $this->handleDataAssociations($element, $class_object, $this->element_varname);
82 
83  return $code;
84  }
static extractILIASEventDefinitionFromProcess($start_event_ref, $type, $bpmn2_array)
$code
Definition: example_050.php:99
static extractTimeDateEventDefinitionFromElement($start_event_ref, $type, $bpmn2_array)
PhpIncludeInspection
Class ilRuntime.
+ Here is the call graph for this function:

Field Documentation

◆ $element_varname

ilReceiveTaskElement::$element_varname

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


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