BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
EntryEvent.cpp
Go to the documentation of this file.
1
#include "
EntryEvent.h
"
2
#include "
execution/engine/src/Engine.h
"
3
4
using namespace
BPMNOS::Execution
;
5
6
EntryEvent::EntryEvent
(
const
Token
* token, std::optional<Values> entryStatus)
7
:
Event
(token)
8
, entryStatus(entryStatus)
9
{
10
}
11
12
void
EntryEvent::processBy
(
Engine
* engine)
const
{
13
engine->
process
(
this
);
14
}
15
16
nlohmann::ordered_json
EntryEvent::jsonify
()
const
{
17
nlohmann::ordered_json jsonObject;
18
19
jsonObject[
"event"
] =
"entry"
;
20
jsonObject[
"processId"
] =
token
->
owner
->
process
->
id
;
21
jsonObject[
"instanceId"
] =
BPMNOS::to_string
((*
token
->
data
)[
BPMNOS::Model::ExtensionElements::Index::Instance
].get().value(),
STRING
);
22
jsonObject[
"nodeId"
] =
token
->
node
->
id
;
23
24
return
jsonObject;
25
}
Engine.h
EntryEvent.h
BPMNOS::Execution::Engine
Definition
Engine.h:30
BPMNOS::Execution::Engine::process
void process(const ReadyEvent *event)
Definition
Engine.cpp:129
BPMNOS::Execution::StateMachine::process
const BPMN::Process * process
Pointer to the top-level process.
Definition
StateMachine.h:39
BPMNOS::Execution::Token
Represents a token running through a (sub)process.
Definition
Token.h:35
BPMNOS::Execution::Token::node
const BPMN::FlowNode * node
Definition
Token.h:46
BPMNOS::Execution::Token::owner
const StateMachine * owner
State machine owning the token.
Definition
Token.h:44
BPMNOS::Execution::Token::data
SharedValues * data
Pointer to the data of the owner or owned state machine subprocesses)
Definition
Token.h:58
BPMN::BaseElement::id
std::string id
Id of element.
Definition
bpmn++.h:16298
BPMNOS::Execution
Definition
Controller.h:9
BPMNOS::to_string
std::string to_string(number numericValue, const ValueType &type)
Converts a number to a string.
Definition
Number.cpp:150
BPMNOS::STRING
@ STRING
Definition
Value.h:9
BPMNOS::Execution::EntryEvent::EntryEvent
EntryEvent(const Token *token, std::optional< Values > entryStatus=std::nullopt)
Definition
EntryEvent.cpp:6
BPMNOS::Execution::EntryEvent::jsonify
nlohmann::ordered_json jsonify() const override
Definition
EntryEvent.cpp:16
BPMNOS::Execution::EntryEvent::processBy
void processBy(Engine *engine) const override
Definition
EntryEvent.cpp:12
BPMNOS::Execution::Event
Definition
Event.h:14
BPMNOS::Execution::Event::token
const Token * token
Definition
Event.h:18
BPMNOS::Model::ExtensionElements::Index::Instance
static constexpr size_t Instance
Definition
ExtensionElements.h:31