|
BPMN-OS
BPMN for optimization and simulation
|
Abstract base class for scenarios holding data for all BPMN instances. More...
Definition at line 21 of file Scenario.h.
#include <Scenario.h>
Classes | |
| struct | InstanceData |
Public Member Functions | |
| virtual | ~Scenario ()=default |
| const Model * | getModel () const |
| Method returning the model. | |
| virtual BPMNOS::number | getEarliestInstantiationTime () const =0 |
| Method returning the time of the earliest instantiation. | |
| virtual bool | isCompleted (const BPMNOS::number currentTime) const =0 |
| Method returning true if the currentTime exceeds the completion time. | |
| virtual std::vector< std::tuple< const BPMN::Process *, BPMNOS::Values, BPMNOS::Values > > | getCurrentInstantiations (const BPMNOS::number currentTime) const =0 |
| Method returning a vector of all instances that are known to be instantiated at the given time. | |
| virtual std::vector< const InstanceData * > | getCreatedInstances (const BPMNOS::number currentTime) const =0 |
| Method returning a vector of all instances that have been created until the given time. | |
| virtual std::vector< const InstanceData * > | getKnownInstances (const BPMNOS::number currentTime) const =0 |
| Method returning a vector of all instances that have been created or are known for sure until the given time. | |
| virtual std::optional< BPMNOS::number > | getKnownValue (const Scenario::InstanceData *instance, const BPMNOS::Model::Attribute *attribute, const BPMNOS::number currentTime) const =0 |
| Method returning a known value of an attribute. | |
| virtual std::optional< BPMNOS::number > | getKnownValue (const BPMNOS::number instanceId, const BPMNOS::Model::Attribute *attribute, const BPMNOS::number currentTime) const =0 |
| Method returning a known value of an attribute. | |
| virtual std::optional< BPMNOS::Values > | getKnownValues (const BPMNOS::number instanceId, const BPMN::Node *node, const BPMNOS::number currentTime) const =0 |
| Method returning all known values of new attributes. | |
| virtual std::optional< BPMNOS::Values > | getKnownData (const BPMNOS::number instanceId, const BPMN::Node *node, const BPMNOS::number currentTime) const =0 |
| Method returning all known values of new attributes. | |
| virtual void | setTaskCompletionStatus (const BPMNOS::number instanceId, const BPMN::Node *task, BPMNOS::Values status) const |
| Store the completion status when a task enters BUSY state. | |
| virtual BPMNOS::Values | getTaskCompletionStatus (const BPMNOS::number instanceId, const BPMN::Node *task) const |
| Get the completion status for a task. | |
| virtual void | initializeArrivalData (BPMNOS::number instanceId, const BPMN::Node *node, const Values &status, const Values &data, const Values &globals) const |
| Initialize arrival data when a token arrives at an activity. | |
Public Attributes | |
| BPMNOS::Values | globals |
| std::map< std::pair< size_t, const BPMN::Node * >, BPMNOS::Values > | taskCompletionStatus |
| Stored completion status per (instanceId, task) | |
| const Model * | model |
| Pointer to the BPMN model. | |
Static Public Attributes | |
| static constexpr char | delimiters [] = {'^','#'} |
| Delimiters used for disambiguation of identifiers of non-interrupting event subprocesses and multi-instance activities. | |
Protected Member Functions | |
| virtual Values | getKnownInitialStatus (const InstanceData *, const BPMNOS::number time) const =0 |
| Method returning the initial status attributes for process instantiation. | |
| virtual Values | getKnownInitialData (const InstanceData *, const BPMNOS::number time) const =0 |
| Method returning the initial data attributes for process instantiation. | |
|
virtualdefault |
|
pure virtual |
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
pure virtual |
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
pure virtual |
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
pure virtual |
If at least one attribute value is not yet known, the method returns std::nullopt.
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
protectedpure virtual |
Used internally by getCurrentInstantiations to get process-level data attributes.
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
protectedpure virtual |
Used internally by getCurrentInstantiations to get process-level status attributes.
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
pure virtual |
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
pure virtual |
If the attribute value is not yet known, the method returns std::nullopt.
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
pure virtual |
If the attribute value is not yet known, the method returns std::nullopt.
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
pure virtual |
If at least one attribute value is not yet known, the method returns std::nullopt.
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
inline |
Definition at line 37 of file Scenario.h.
|
inlinevirtual |
For deterministic scenarios, returns the value stored by setTaskCompletionStatus(). For stochastic scenarios, evaluates COMPLETION expressions and returns updated status.
| instanceId | The instance identifier. |
| task | The task node that is completing. |
Definition at line 117 of file Scenario.h.
|
inlinevirtual |
Evaluates ARRIVAL expressions using the parent scope's context. Default implementation does nothing - only StochasticScenario evaluates ARRIVAL.
| instanceId | The instance identifier. |
| node | The activity node being entered. |
| status | Parent scope's status attributes. |
| data | Parent scope's data attributes. |
| globals | Global attributes. |
Reimplemented in BPMNOS::Model::StochasticScenario.
Definition at line 136 of file Scenario.h.
|
pure virtual |
Implemented in BPMNOS::Model::DynamicScenario, BPMNOS::Model::StaticScenario, and BPMNOS::Model::StochasticScenario.
|
inlinevirtual |
| instanceId | The instance identifier. |
| task | The task node entering BUSY state. |
| status | The predicted completion status values. |
Reimplemented in BPMNOS::Model::StochasticScenario.
Definition at line 99 of file Scenario.h.
|
staticconstexpr |
Definition at line 32 of file Scenario.h.
| BPMNOS::Values BPMNOS::Model::Scenario::globals |
Definition at line 144 of file Scenario.h.
| const Model* BPMNOS::Model::Scenario::model |
Definition at line 148 of file Scenario.h.
|
mutable |
Definition at line 147 of file Scenario.h.