bpmn++
A BPMN parser library, written in C++
Loading...
Searching...
No Matches
BoundaryEvent.cpp
Go to the documentation of this file.
1#include "BoundaryEvent.h"
2
3using namespace BPMN;
4
6 : Node(boundaryEvent)
7 , FlowNode(boundaryEvent,parent)
8 , CatchEvent(boundaryEvent,parent)
9 , isInterrupting(element->get<XML::bpmn::tBoundaryEvent>()->cancelActivity.has_value() ? (bool)element->get<XML::bpmn::tBoundaryEvent>()->cancelActivity.value().get().value : true)
11{
12}
13
15 const std::string& reference = element->get<XML::bpmn::tBoundaryEvent>()->attachedToRef.value;
16 for ( auto& sibling : parent->flowNodes ) {
17 if ( sibling->id == reference ) {
18 Activity* activity = sibling->as<Activity>();
19 activity->boundaryEvents.push_back(this);
20 return activity;
21 }
22 }
23 throw std::runtime_error("BoundaryEvent: cannot resolve reference '" + reference + "' for boundary event '" + id + "'");
24}
25
std::vector< BoundaryEvent * > boundaryEvents
Definition Activity.h:20
T * get()
Casts the element to the specified type T.
Definition BaseElement.h:55
Activity * resolveReference()
BoundaryEvent(XML::bpmn::tBoundaryEvent *boundaryEvent, Scope *parent)
CatchEvent(XML::bpmn::tCatchEvent *catchEvent, Scope *parent)
Definition CatchEvent.cpp:5
XML::bpmn::tCatchEvent * element
Definition CatchEvent.h:16
Scope * parent
Reference to the parent node.
Definition ChildNode.h:46
T * as()
Casts the element to the specified type T.
Definition Element.h:38
Base class for BPMN elements that may contain incoming and outgoing sequence flows.
Definition FlowNode.h:20
Base class for all nodes in a BPMN model.
Definition Node.h:24
Base class for BPMN elements that may contain a ChildNode elements.
Definition Scope.h:24
The BPMN namespace contains linked classes representing a BPMN model.
The XML namespace contains classes representing XML-nodes defined in given XML-schema(s).
Definition XMLObject.cpp:9