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

Represents a state machine for BPMN execution of a scope in the model. More...

Detailed Description

This class manages all tokens for BPMN execution of a given scope. It also holds a state machine for each child scope instantiated.

Note
A state machine without parentToken represents a BPMN::Process.
Note
Inclusive gateways are not yet supported.
Attention
Event subprocesses within event subprocesses are not yet tested (and may not be supported).

Definition at line 29 of file StateMachine.h.

#include <StateMachine.h>

Inheritance diagram for BPMNOS::Execution::StateMachine:

Public Member Functions

 StateMachine (const SystemState *systemState, const BPMN::Process *process, Values dataAttributes)
 
 StateMachine (const SystemState *systemState, const BPMN::Scope *scope, Token *parentToken, Values dataAttributes, std::optional< BPMNOS::number > instance=std::nullopt)
 
 StateMachine (const StateMachine *other)
 
 ~StateMachine ()
 
Values getData (const BPMN::Scope *scope)
 
Tokens getCompensationTokens (const BPMN::Activity *activity=nullptr) const
 Returns the compensation tokens for a given activity or for all activities.
 
void run (Values status)
 Create initial token and advance it.
 

Public Attributes

const SystemStatesystemState
 
const BPMN::Processprocess
 Pointer to the top-level process.
 
const BPMN::Scopescope
 Pointer to the current scope.
 
const StateMachineroot
 Pointer to the root state machine.
 
std::optional< BPMNOS::numberinstance
 Numeric representation of instance id (TODO: can we const this?)
 
TokenparentToken
 
Values ownedData
 Container holding data attributes owned by the state machine.
 
SharedValues data
 Container holding references to all data attributes.
 
Tokens tokens
 Container with all tokens within the scope of the state machine.
 
std::shared_ptr< StateMachineinterruptingEventSubProcess
 State machines representing an active event subprocess that is interrupting.
 
StateMachines nonInterruptingEventSubProcesses
 Container with state machines of all active event subprocesses that are not interrupting.
 
StateMachines pendingEventSubProcesses
 Container with state machines of all inactive event subprocesses that may be triggered.
 
Tokens compensationTokens
 Container with all tokens created for a compensation activity.
 
StateMachines compensationEventSubProcesses
 Container with state machines created for a compensation event subprocesses of a child subprocess.
 
StateMachines compensableSubProcesses
 Container holding state machines for completed subprocesses with a compensation event subprocess and compensation tokens.
 

Friends

class Engine
 
class SystemState
 
class Token
 

Constructor & Destructor Documentation

◆ StateMachine() [1/3]

StateMachine::StateMachine ( const SystemState * systemState,
const BPMN::Process * process,
Values dataAttributes )

Definition at line 16 of file StateMachine.cpp.

◆ StateMachine() [2/3]

StateMachine::StateMachine ( const SystemState * systemState,
const BPMN::Scope * scope,
Token * parentToken,
Values dataAttributes,
std::optional< BPMNOS::number > instance = std::nullopt )

Definition at line 30 of file StateMachine.cpp.

◆ StateMachine() [3/3]

StateMachine::StateMachine ( const StateMachine * other)

Definition at line 54 of file StateMachine.cpp.

◆ ~StateMachine()

StateMachine::~StateMachine ( )

Definition at line 68 of file StateMachine.cpp.

Member Function Documentation

◆ getCompensationTokens()

Tokens StateMachine::getCompensationTokens ( const BPMN::Activity * activity = nullptr) const

Definition at line 901 of file StateMachine.cpp.

◆ getData()

BPMNOS::Values StateMachine::getData ( const BPMN::Scope * scope)

Definition at line 77 of file StateMachine.cpp.

◆ run()

void StateMachine::run ( Values status)

Definition at line 453 of file StateMachine.cpp.

Friends And Related Symbol Documentation

◆ Engine

friend class Engine
friend

Definition at line 61 of file StateMachine.h.

◆ SystemState

friend class SystemState
friend

Definition at line 62 of file StateMachine.h.

◆ Token

friend class Token
friend

Definition at line 63 of file StateMachine.h.

Member Data Documentation

◆ compensableSubProcesses

StateMachines BPMNOS::Execution::StateMachine::compensableSubProcesses

Definition at line 55 of file StateMachine.h.

◆ compensationEventSubProcesses

StateMachines BPMNOS::Execution::StateMachine::compensationEventSubProcesses

Definition at line 54 of file StateMachine.h.

◆ compensationTokens

Tokens BPMNOS::Execution::StateMachine::compensationTokens

Definition at line 53 of file StateMachine.h.

◆ data

SharedValues BPMNOS::Execution::StateMachine::data

Definition at line 46 of file StateMachine.h.

◆ instance

std::optional<BPMNOS::number> BPMNOS::Execution::StateMachine::instance

Definition at line 42 of file StateMachine.h.

◆ interruptingEventSubProcess

std::shared_ptr<StateMachine> BPMNOS::Execution::StateMachine::interruptingEventSubProcess

Definition at line 49 of file StateMachine.h.

◆ nonInterruptingEventSubProcesses

StateMachines BPMNOS::Execution::StateMachine::nonInterruptingEventSubProcesses

Definition at line 50 of file StateMachine.h.

◆ ownedData

Values BPMNOS::Execution::StateMachine::ownedData

Definition at line 45 of file StateMachine.h.

◆ parentToken

Token* BPMNOS::Execution::StateMachine::parentToken

Definition at line 44 of file StateMachine.h.

◆ pendingEventSubProcesses

StateMachines BPMNOS::Execution::StateMachine::pendingEventSubProcesses

Definition at line 51 of file StateMachine.h.

◆ process

const BPMN::Process* BPMNOS::Execution::StateMachine::process

Definition at line 39 of file StateMachine.h.

◆ root

const StateMachine* BPMNOS::Execution::StateMachine::root

Definition at line 41 of file StateMachine.h.

◆ scope

const BPMN::Scope* BPMNOS::Execution::StateMachine::scope

Definition at line 40 of file StateMachine.h.

◆ systemState

const SystemState* BPMNOS::Execution::StateMachine::systemState

Definition at line 38 of file StateMachine.h.

◆ tokens

Tokens BPMNOS::Execution::StateMachine::tokens

Definition at line 48 of file StateMachine.h.


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