#pragma once #include #include #include #include #include namespace wfr { //Forward declarations namespace wfs { class Workflow; class ActivityInstance; } namespace wep { class WorkflowExecutionPlan; } namespace scheduling { class AbstractScheduler; } // Main namespace namespace enactment { class EnactmentEngine { // Mutable properties that need to be accessed via getter-/setter-functions. private: std::shared_ptr wep; bool breakExecutionLoop = false; std::queue updateQueue; std::mutex updateMutex; std::condition_variable updateCondition; bool enableWepDotFileWriter; bool enableWepProgressionWriter; bool enableEarlyEvaluation; // Invariant properties that can be accessed directly. public: wfs::Workflow& workflow; scheduling::AbstractScheduler& scheduler; // Public static functions public: static void init(int argc, char** argv); static void finish(); // Public functions public: EnactmentEngine(wfs::Workflow& workflow, scheduling::AbstractScheduler& scheduler) noexcept; void workflowExecutionLoop(lwd::_wfr_lwd* input, lwd::_wfr_lwd* output); void notifyActivityInstanceStateUpdate(wfs::ActivityInstance& ai, scheduling::AbstractScheduler& scheduler); }; } /* namespace wep */ } /* namespace wfr */