1#ifndef BPMNOS_Execution_Engine_H
2#define BPMNOS_Execution_Engine_H
73 : function(
std::move(f)) {};
76 : function(
std::move(f))
77 , stateMachine_ptr(stateMachine->weak_from_this()) {};
80 : function(
std::move(f))
81 , stateMachine_ptr(const_cast<
StateMachine*>(token->owner)->weak_from_this())
82 , token_ptr(token->weak_from_this()) {};
86 std::function<void()> function;
87 std::optional< std::weak_ptr<StateMachine> > stateMachine_ptr;
88 std::optional< std::weak_ptr<Token> > token_ptr;
Class storing a command to be executed by the engine.
Command(std::function< void()> &&f, StateMachine *stateMachine)
Command(std::function< void()> &&f, Token *token)
Command(std::function< void()> &&f)
void process(const ReadyEvent *event)
void deleteInstance(StateMachine *instance)
Method removing completed instance.
BPMNOS::number clockTick
Timestep used to advance the current time by systemState.time += clockTick.
BPMNOS::number run(const BPMNOS::Model::Scenario *scenario, BPMNOS::number timeout=std::numeric_limits< BPMNOS::number >::max())
Runs a scenario as long as there is a token or new instantiations. Terminates when the time if the sy...
std::unique_ptr< ConditionalEventObserver > conditionalEventObserver
std::unique_ptr< SystemState > systemState
std::list< Command > commands
List of commands to be executed.
const SystemState * getSystemState()
Returns a pointer to the system state.
BPMNOS::number getCurrentTime()
Returns the timestamp the engine is in.
void addInstances()
Method adding all new instances and advancing tokens as much as possible.
Represents a state machine for BPMN execution of a scope in the model.
A class representing the state that the execution or simulation of a given scenario is in.
Represents a token running through a (sub)process.
The Scenario class holds data for all BPMN instances.
BPMNOS_NUMBER_TYPE number
Represents the event that choices are made for a DecisionTask.
Represents an event that increments the current time.
Class representing the event of a token having completed an activity.
Represents the event of a token entering a node.
Represents the event of an error being raised.
Represents the event of a token exiting a node.
Represents the event of a message from the message pool being delivered.
Represents the event of a token ready to enter a node inclduing necressary new attribute data.
Represents an event causing the engine to terminate.