11 , element(messageFlow)
12 , source( {
nullptr,
nullptr} )
13 , target( {
nullptr,
nullptr} )
17void MessageFlow::initialize(std::vector< std::unique_ptr<Process> >& processes, std::unordered_map<std::string,std::string>& participantMap) {
21 for (
auto& process : processes ) {
28 source = { process.get(), flowNode };
33 throw std::runtime_error(
"MessageFlow: cannot find source of '" +
id +
"'");
38 for (
auto& process : processes ) {
41 source = { process.get(), flowNode };
49 for (
auto& process : processes ) {
56 target = { process.get(), flowNode };
62 throw std::runtime_error(
"MessageFlow: cannot find target of '" +
id +
"'");
67 for (
auto& process : processes ) {
70 target = { process.get(), flowNode };
79 if ( childNode->get<>()->id.has_value() &&
id == childNode->get<>()->
id->get().value.value ) {
82 if (
auto childScope = childNode->represents<
Scope>(); childScope ) {
Base class for all core BPMN elements.
std::string id
Id of element.
T * get()
Casts the element to the specified type T.
T * as()
Casts the element to the specified type T.
Base class for BPMN elements that may contain incoming and outgoing sequence flows.
std::pair< Process *, FlowNode * > target
Reference to the target node of the message flow.
MessageFlow(XML::bpmn::tMessageFlow *messageFlow)
Constructs a MessageFlow object based on a XML::bpmn::tMessageFlow element.
XML::bpmn::tMessageFlow * element
void initialize(std::vector< std::unique_ptr< Process > > &processes, std::unordered_map< std::string, std::string > &participantMap)
std::pair< Process *, FlowNode * > source
Reference to the source node of the message flow.
FlowNode * findRecursive(std::string &id, Scope *scope)
Base class for BPMN elements that may contain a ChildNode elements.
std::vector< std::unique_ptr< Node > > childNodes
Vector containing all child nodes within the scope of the nodes.
Attribute & sourceRef
Attribute value can be expected to be of type 'std::string'.
Attribute & targetRef
Attribute value can be expected to be of type 'std::string'.
The BPMN namespace contains linked classes representing a BPMN model.