8 , choices(
std::move(choices))
17 nlohmann::ordered_json jsonObject;
19 jsonObject[
"event"] =
"choice";
24 jsonObject[
"choices"] = nlohmann::ordered_json();
26 for (
size_t i = 0; i < extensionElements->choices.size(); i++) {
27 auto attribute = extensionElements->choices[i]->attribute;
28 if ( attribute->type ==
BOOLEAN) {
30 jsonObject[
"choices"][attribute->name] = value ;
32 else if ( attribute->type ==
INTEGER) {
34 jsonObject[
"choices"][attribute->name] = value ;
36 else if ( attribute->type ==
DECIMAL) {
37 double value = (double)
choices[i];
38 jsonObject[
"choices"][attribute->name] = value ;
40 else if ( attribute->type ==
STRING) {
42 jsonObject[
"choices"][attribute->name] = value ;
46 jsonObject[
"choices"][attribute->name] = value ;
void process(const ReadyEvent *event)
const BPMN::Process * process
Pointer to the top-level process.
Represents a token running through a (sub)process.
const BPMN::FlowNode * node
const StateMachine * owner
State machine owning the token.
SharedValues * data
Pointer to the data of the owner or owned state machine subprocesses)
Class holding extension elements representing execution data for nodes.
std::unique_ptr< ExtensionElements > extensionElements
std::string id
Id of element.
std::string to_string(number numericValue, const ValueType &type)
Converts a number to a string.
std::vector< number > choices
ChoiceEvent(const Token *token, std::vector< number > choices)
void processBy(Engine *engine) const
nlohmann::ordered_json jsonify() const override
static constexpr size_t Instance