BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
BPMNOS::Model::Model Class Reference

Represents a BPMN model with all its processes. More...

Detailed Description

The Model class encapsulates all processes with their nodes and sequence flows of a BPMN model.

Definition at line 21 of file Model.h.

#include <Model.h>

Inheritance diagram for BPMNOS::Model::Model:

Public Member Functions

 Model (const std::string filename, const std::vector< std::string > folders={})
 
 ~Model ()
 
std::vector< std::reference_wrapper< XML::bpmnos::tAttribute > > getAttributes (XML::bpmn::tBaseElement *element)
 
std::vector< std::reference_wrapper< XML::bpmnos::tAttribute > > getData (XML::bpmn::tBaseElement *element)
 
std::unique_ptr< LookupTablecreateLookupTable (XML::bpmnos::tTable *table)
 
std::unique_ptr< XML::XMLObjectcreateRoot (const std::string &filename) override
 
std::unique_ptr< BPMN::ProcesscreateProcess (XML::bpmn::tProcess *process) override
 
std::unique_ptr< BPMN::EventSubProcesscreateEventSubProcess (XML::bpmn::tSubProcess *subProcess, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateActivity (XML::bpmn::tActivity *activity, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::SequenceFlowcreateSequenceFlow (XML::bpmn::tSequenceFlow *sequenceFlow, BPMN::Scope *scope) override
 
std::unique_ptr< BPMN::FlowNodecreateAdHocSubProcess (XML::bpmn::tAdHocSubProcess *adHocSubProcess, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateTask (XML::bpmn::tTask *task, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateTimerStartEvent (XML::bpmn::tStartEvent *startEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateTimerBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateTimerCatchEvent (XML::bpmn::tCatchEvent *catchEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateSignalStartEvent (XML::bpmn::tStartEvent *startEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateSignalBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateSignalCatchEvent (XML::bpmn::tCatchEvent *catchEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateSignalThrowEvent (XML::bpmn::tThrowEvent *throwEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateConditionalStartEvent (XML::bpmn::tStartEvent *startEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateConditionalBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateConditionalCatchEvent (XML::bpmn::tCatchEvent *catchEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateMessageStartEvent (XML::bpmn::tStartEvent *startEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateMessageBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateMessageCatchEvent (XML::bpmn::tCatchEvent *catchEvent, BPMN::Scope *parent) override
 
std::unique_ptr< BPMN::FlowNodecreateMessageThrowEvent (XML::bpmn::tThrowEvent *throwEvent, BPMN::Scope *parent) override
 
void createMessageFlows () override
 
bool messageMayBeCaught (BPMN::Process *sendingProcess, BPMN::FlowNode *throwingMessageEvent, BPMN::Process *receivingProcess, BPMN::FlowNode *catchingMessageEvent)
 
bool messageMayBeThrown (BPMN::Process *sendingProcess, BPMN::FlowNode *throwingMessageEvent, BPMN::Process *receivingProcess, BPMN::FlowNode *catchingMessageEvent)
 
void createMessageCandidates (BPMN::Process *sendingProcess, BPMN::FlowNode *throwingMessageEvent, BPMN::Process *receivingProcess, BPMN::FlowNode *catchingMessageEvent)
 
std::vector< BPMN::MessageFlow * > & determineMessageFlows (BPMN::FlowNode *messageEvent, auto getMessageFlows)
 
- Public Member Functions inherited from BPMN::Model
 Model (const std::string &filename)
 

Static Public Member Functions

static bool hasSequentialPerformer (const std::vector< std::reference_wrapper< XML::bpmn::tResourceRole > > &resources)
 

Public Attributes

const std::string filename
 File name of the BPMN model.
 
const std::vector< std::string > folders
 Folders containing lookup tables.
 
AttributeRegistry attributeRegistry
 Registry allowing to look up all status and data attributes by their names.
 
std::vector< std::unique_ptr< LookupTable > > lookupTables
 Vector containing lookup tables declared in model.
 
std::vector< std::unique_ptr< Attribute > > attributes
 Vector containing new global attributes declared for the model.
 
- Public Attributes inherited from BPMN::Model
std::vector< std::unique_ptr< XML::XMLObject > > roots
 
std::vector< std::unique_ptr< Process > > processes
 
std::vector< std::unique_ptr< MessageFlow > > messageFlows
 

Additional Inherited Members

- Protected Member Functions inherited from BPMN::Model
 Model ()
 
virtual void readBPMNFile (const std::string &filename)
 
virtual std::unique_ptr< FlowNodecreateFlowNode (XML::bpmn::tFlowNode *flowNode, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateSubProcess (XML::bpmn::tSubProcess *subProcess, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateCallActivity (XML::bpmn::tCallActivity *callActivity, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateTransaction (XML::bpmn::tTransaction *transaction, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateAbstractTask (XML::bpmn::tTask *task, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateSendTask (XML::bpmn::tSendTask *sendTask, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateReceiveTask (XML::bpmn::tReceiveTask *receiveTask, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateUserTask (XML::bpmn::tUserTask *userTask, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateManualTask (XML::bpmn::tManualTask *manualTask, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateScriptTask (XML::bpmn::tScriptTask *scriptTask, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateBusinessRuleTask (XML::bpmn::tBusinessRuleTask *businessRuleTask, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateEvent (XML::bpmn::tEvent *event, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateCancelBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateCompensateBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateErrorBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateEscalationBoundaryEvent (XML::bpmn::tBoundaryEvent *boundaryEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateCatchEvent (XML::bpmn::tCatchEvent *catchEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateLinkTargetEvent (XML::bpmn::tCatchEvent *catchEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateTypedStartEvent (XML::bpmn::tStartEvent *startEvent, XML::bpmn::tEventDefinition &eventDefinition, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateCompensateStartEvent (XML::bpmn::tStartEvent *startEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateErrorStartEvent (XML::bpmn::tStartEvent *startEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateEscalationStartEvent (XML::bpmn::tStartEvent *startEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateUntypedStartEvent (XML::bpmn::tCatchEvent *catchEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateThrowEvent (XML::bpmn::tThrowEvent *throwEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateCancelEndEvent (XML::bpmn::tThrowEvent *throwEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateCompensateThrowEvent (XML::bpmn::tThrowEvent *throwEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateErrorEndEvent (XML::bpmn::tThrowEvent *throwEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateEscalationThrowEvent (XML::bpmn::tThrowEvent *throwEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateTerminateEvent (XML::bpmn::tThrowEvent *throwEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateLinkSourceEvent (XML::bpmn::tThrowEvent *throwEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateUntypedEndEvent (XML::bpmn::tThrowEvent *throwEvent, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateGateway (XML::bpmn::tGateway *gateway, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateParallelGateway (XML::bpmn::tParallelGateway *parallelGateway, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateExclusiveGateway (XML::bpmn::tExclusiveGateway *exclusiveGateway, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateInclusiveGateway (XML::bpmn::tInclusiveGateway *inclusiveGateway, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateEventBasedGateway (XML::bpmn::tEventBasedGateway *eventBasedGateway, Scope *parent)
 
virtual std::unique_ptr< FlowNodecreateComplexGateway (XML::bpmn::tComplexGateway *complexGateway, Scope *parent)
 
virtual std::unique_ptr< DataObjectcreateDataObject (XML::bpmn::tDataObject *dataObject, BPMN::Scope *scope)
 
virtual std::unique_ptr< MessageFlowcreateMessageFlow (XML::bpmn::tMessageFlow *messageFlow)
 
virtual void createChildNodes (Scope *scope)
 
virtual void createSequenceFlows (Scope *scope)
 
virtual void createNestedReferences (Scope *scope)
 
virtual void createFlowReferences (FlowNode *flowNode)
 
virtual void createCompensations (Scope *scope)
 
virtual void createCompensationReferences (Scope *scope)
 
virtual void createLinks (Scope *scope)
 
- Static Protected Member Functions inherited from BPMN::Model
template<typename T >
static std::unique_ptr< T > bind (std::unique_ptr< T > &&baseElement, std::unique_ptr< ExtensionElements > &&extensionElements)
 Binds the extension elements to the given baseElement.
 
template<typename T >
static std::unique_ptr< T > bind (std::unique_ptr< T > &baseElement, std::unique_ptr< ExtensionElements > &extensionElements)
 Binds the extension elements to the given baseElement.
 
template<typename T >
static std::unique_ptr< T > bind (std::unique_ptr< T > &baseElement, std::unique_ptr< ExtensionElements > &&extensionElements)
 Binds the extension elements to the given baseElement.
 
template<typename T >
static std::unique_ptr< T > bind (std::unique_ptr< T > &&baseElement, std::unique_ptr< ExtensionElements > &extensionElements)
 Binds the extension elements to the given baseElement.
 

Constructor & Destructor Documentation

◆ Model()

Model::Model ( const std::string filename,
const std::vector< std::string > folders = {} )

Definition at line 21 of file Model.cpp.

◆ ~Model()

Model::~Model ( )
virtual

Reimplemented from BPMN::Model.

Definition at line 29 of file Model.cpp.

Member Function Documentation

◆ createActivity()

std::unique_ptr< BPMN::FlowNode > Model::createActivity ( XML::bpmn::tActivity * activity,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 127 of file Model.cpp.

◆ createAdHocSubProcess()

std::unique_ptr< BPMN::FlowNode > Model::createAdHocSubProcess ( XML::bpmn::tAdHocSubProcess * adHocSubProcess,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 165 of file Model.cpp.

◆ createConditionalBoundaryEvent()

std::unique_ptr< BPMN::FlowNode > Model::createConditionalBoundaryEvent ( XML::bpmn::tBoundaryEvent * boundaryEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 249 of file Model.cpp.

◆ createConditionalCatchEvent()

std::unique_ptr< BPMN::FlowNode > Model::createConditionalCatchEvent ( XML::bpmn::tCatchEvent * catchEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 257 of file Model.cpp.

◆ createConditionalStartEvent()

std::unique_ptr< BPMN::FlowNode > Model::createConditionalStartEvent ( XML::bpmn::tStartEvent * startEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 241 of file Model.cpp.

◆ createEventSubProcess()

std::unique_ptr< BPMN::EventSubProcess > Model::createEventSubProcess ( XML::bpmn::tSubProcess * subProcess,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 120 of file Model.cpp.

◆ createLookupTable()

std::unique_ptr< LookupTable > Model::createLookupTable ( XML::bpmnos::tTable * table)

Definition at line 64 of file Model.cpp.

◆ createMessageBoundaryEvent()

std::unique_ptr< BPMN::FlowNode > Model::createMessageBoundaryEvent ( XML::bpmn::tBoundaryEvent * boundaryEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 301 of file Model.cpp.

◆ createMessageCandidates()

void Model::createMessageCandidates ( BPMN::Process * sendingProcess,
BPMN::FlowNode * throwingMessageEvent,
BPMN::Process * receivingProcess,
BPMN::FlowNode * catchingMessageEvent )

Definition at line 486 of file Model.cpp.

◆ createMessageCatchEvent()

std::unique_ptr< BPMN::FlowNode > Model::createMessageCatchEvent ( XML::bpmn::tCatchEvent * catchEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 321 of file Model.cpp.

◆ createMessageFlows()

void Model::createMessageFlows ( )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 349 of file Model.cpp.

◆ createMessageStartEvent()

std::unique_ptr< BPMN::FlowNode > Model::createMessageStartEvent ( XML::bpmn::tStartEvent * startEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 265 of file Model.cpp.

◆ createMessageThrowEvent()

std::unique_ptr< BPMN::FlowNode > Model::createMessageThrowEvent ( XML::bpmn::tThrowEvent * throwEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 341 of file Model.cpp.

◆ createProcess()

std::unique_ptr< BPMN::Process > Model::createProcess ( XML::bpmn::tProcess * process)
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 113 of file Model.cpp.

◆ createRoot()

std::unique_ptr< XML::XMLObject > Model::createRoot ( const std::string & filename)
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 70 of file Model.cpp.

◆ createSequenceFlow()

std::unique_ptr< BPMN::SequenceFlow > Model::createSequenceFlow ( XML::bpmn::tSequenceFlow * sequenceFlow,
BPMN::Scope * scope )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 157 of file Model.cpp.

◆ createSignalBoundaryEvent()

std::unique_ptr< BPMN::FlowNode > Model::createSignalBoundaryEvent ( XML::bpmn::tBoundaryEvent * boundaryEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 217 of file Model.cpp.

◆ createSignalCatchEvent()

std::unique_ptr< BPMN::FlowNode > Model::createSignalCatchEvent ( XML::bpmn::tCatchEvent * catchEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 225 of file Model.cpp.

◆ createSignalStartEvent()

std::unique_ptr< BPMN::FlowNode > Model::createSignalStartEvent ( XML::bpmn::tStartEvent * startEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 209 of file Model.cpp.

◆ createSignalThrowEvent()

std::unique_ptr< BPMN::FlowNode > Model::createSignalThrowEvent ( XML::bpmn::tThrowEvent * throwEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 233 of file Model.cpp.

◆ createTask()

std::unique_ptr< BPMN::FlowNode > Model::createTask ( XML::bpmn::tTask * task,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 169 of file Model.cpp.

◆ createTimerBoundaryEvent()

std::unique_ptr< BPMN::FlowNode > Model::createTimerBoundaryEvent ( XML::bpmn::tBoundaryEvent * boundaryEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 193 of file Model.cpp.

◆ createTimerCatchEvent()

std::unique_ptr< BPMN::FlowNode > Model::createTimerCatchEvent ( XML::bpmn::tCatchEvent * catchEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 201 of file Model.cpp.

◆ createTimerStartEvent()

std::unique_ptr< BPMN::FlowNode > Model::createTimerStartEvent ( XML::bpmn::tStartEvent * startEvent,
BPMN::Scope * parent )
overridevirtual

Reimplemented from BPMN::Model.

Definition at line 185 of file Model.cpp.

◆ determineMessageFlows()

std::vector< BPMN::MessageFlow * > & Model::determineMessageFlows ( BPMN::FlowNode * messageEvent,
auto getMessageFlows )

Definition at line 381 of file Model.cpp.

◆ getAttributes()

std::vector< std::reference_wrapper< XML::bpmnos::tAttribute > > Model::getAttributes ( XML::bpmn::tBaseElement * element)

Definition at line 34 of file Model.cpp.

◆ getData()

std::vector< std::reference_wrapper< XML::bpmnos::tAttribute > > Model::getData ( XML::bpmn::tBaseElement * element)

Definition at line 46 of file Model.cpp.

◆ hasSequentialPerformer()

bool Model::hasSequentialPerformer ( const std::vector< std::reference_wrapper< XML::bpmn::tResourceRole > > & resources)
static

Definition at line 530 of file Model.cpp.

◆ messageMayBeCaught()

bool Model::messageMayBeCaught ( BPMN::Process * sendingProcess,
BPMN::FlowNode * throwingMessageEvent,
BPMN::Process * receivingProcess,
BPMN::FlowNode * catchingMessageEvent )

Definition at line 402 of file Model.cpp.

◆ messageMayBeThrown()

bool Model::messageMayBeThrown ( BPMN::Process * sendingProcess,
BPMN::FlowNode * throwingMessageEvent,
BPMN::Process * receivingProcess,
BPMN::FlowNode * catchingMessageEvent )

Definition at line 444 of file Model.cpp.

Member Data Documentation

◆ attributeRegistry

AttributeRegistry BPMNOS::Model::Model::attributeRegistry

Definition at line 68 of file Model.h.

◆ attributes

std::vector< std::unique_ptr<Attribute> > BPMNOS::Model::Model::attributes

Definition at line 70 of file Model.h.

◆ filename

const std::string BPMNOS::Model::Model::filename

Definition at line 25 of file Model.h.

◆ folders

const std::vector<std::string> BPMNOS::Model::Model::folders

Definition at line 26 of file Model.h.

◆ lookupTables

std::vector< std::unique_ptr<LookupTable> > BPMNOS::Model::Model::lookupTables

Definition at line 69 of file Model.h.


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