The execution engine is responsible for running a BPMN model instance. It requires a data provider, several event dispatchers to provide execution relevant information during runtime, and a controller making decisions during execution. Below is an example using a static data provider to obtain a scenario, a ready handler, to provide activity-related information, a deterministic completion handler, to trigger task completion, and a time warp handler, to trigger the advancement of the simulation time, and a greedy controller using a guided evaluator.
#include <bpmnos-model.h>
#include <bpmnos-execution.h>
int main() {
auto scenario = dataProvider.createScenario();
completionHandler.
connect(&engine);
controller.connect(&engine);
engine.
run(scenario.get());
}
Class creating a completion event for a token awaiting the completion of a task (except DecisionTask)...
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...
virtual void connect(Mediator *mediator)
A controller dispatching the best evaluated decisions.
Class representing an evaluator that uses the guidance that may be provided.
Class dispatching a ready event when the required data is available a token at an activity.
Class creating a clock tick event each time fetchEvent() is called.
Class representing a data provider for static BPMN instance data.