Exemplo n.º 1
0
 protected function parseBoundaryEvent($id, \DOMElement $el, BusinessProcessBuilder $builder)
 {
     $attachedTo = $el->getAttribute('attachedToRef');
     $cancelActivity = true;
     if ($el->hasAttribute('cancelActivity')) {
         $cancelActivity = strtolower($el->getAttribute('cancelActivity')) == 'true';
     }
     foreach ($this->xpath->query('m:messageEventDefinition', $el) as $messageElement) {
         $message = $this->messages[$messageElement->getAttribute('messageRef')];
         $event = $builder->messageBoundaryEvent($id, $attachedTo, $message, $el->getAttribute('name'));
         $event->setInterrupting($cancelActivity);
         return $event;
     }
     foreach ($this->xpath->query('m:signalEventDefinition', $el) as $def) {
         $signal = $this->signals[$def->getAttribute('signalRef')];
         $event = $builder->signalBoundaryEvent($id, $attachedTo, $signal, $el->getAttribute('name'));
         $event->setInterrupting($cancelActivity);
         return $event;
     }
     throw new \RuntimeException('Unsupported boundary event type with id ' . $id);
 }