21 nlohmann::ordered_json jsonObject;
23 jsonObject[
"decision"] =
"messagedelivery";
28 if (
auto object =
message.lock() ) {
29 jsonObject[
"message"] =
object->jsonify();
33 jsonObject[
"evaluation"] = (double)
evaluation.value();
Represents an abstract base class for a pending decision.
std::optional< double > evaluation
Latest evaluation or null if decision has not been evaluated or evaluation is no longer valid.
void determineDependencies(const std::set< const BPMNOS::Model::Attribute * > &dependencies)
Represents an abstract base class for a pending Evaluator.
virtual std::optional< double > evaluate(EntryDecision *decision)=0
virtual std::set< const BPMNOS::Model::Attribute * > getDependencies(EntryDecision *decision)=0
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)
std::string id
Id of element.
std::string to_string(number numericValue, const ValueType &type)
Converts a number to a string.
std::optional< double > evaluate() override
Evaluates the reward for the decision. Returns null if decision is infeasible.
nlohmann::ordered_json jsonify() const override
MessageDeliveryDecision(const Token *token, const Message *message, Evaluator *evaluator)
Represents the event of a message from the message pool being delivered.
std::weak_ptr< const Message > message
static constexpr size_t Instance