Create a Situation Action Workflow Engine
You can create a new Workflow Engine to trigger workflows based upon Situation actions (sigAction). For example, when a new situation is created, updated, or closed. For a full list of Situation actions, see Situation Action Codes.
Before you begin
Before you start to create a Situation Action Workflow Engine:
Verify you have SSH access to all core machines that run Moogfarmd.
Make sure you have the credentials for the user that runs the Moogsoft processes on the core machine so you can restart Moogfarmd.
Create the Situation Action Workflow Engine Moolet
To create the Situation Action Workflow Engine, add a new Moolet to Moogfarmd on all core machines as follows:
Create and edit a new Moolet configuration file:
$MOOGSOFT_HOME/config/moolets/situation_action_workflows.conf
Add the following text to the configuration file:
{ name: "Situation Action Workflows", classname: "com.moogsoft.farmd.moolet.workflowengine.CWorkflowEngine", message_type: "situation", run_on_startup : true, metric_path_moolet: true, moobot: "WorkflowEngine.js", standalone_moolet: true, mooms_event_handler: false, event_handlers : [ "SigAction" ] }
The Situation Action Workflow Engine runs outside the data processing flow. Situation actions (Sigaction) trigger the workflows in the standalone engine.
Add the Situation Action Workflow Engine Moolet to the array of Moolets in the Moogfarmd configuration file:
$MOOGSOFT_HOME/config/moog_farmd.conf
. For example:moolets : [ ... { include : "alert_inform_workflows.conf" }, { include : "situation_inform_workflows.conf" }, { include : "situation_action_workflows.conf" } ]
Restart Moogfarmd.
After Moogfarmd restarts, the Situation Action Workflow appears in the list of available Workflow Engines in the Moogsoft Onprem UI under Settings > Automation > Workflow Engine.
Create a workflow and with an action using the sigActionFilter
function to trigger a workflow when the Situation action occurs.