Skip to main content

sendSituationsToWorkflow

AA Workflow Engine function that sends the active Situation an alert is a member of to a named workflow within a named Inform based workflow engine using the MoogdbV2 sendToWorkflow API call. Returns true if all the Situations were sent successfully to the target workflow. Returns false if one or more Situations failed to send.

You can optionally provide a context for the target workflow. This context is available to the target workflow in the workflowContext. By default, adds the triggering alert_id to the context as workflowContext.alert_id.

This function is available as a feature of the Add-ons v2.1 download and later. See Install Moogsoft Add-ons for information on how to upgrade.

This function is available for alert workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function sendSituationsToWorkflow takes the following arguments:

Name

Required

Type

Description

engineName

Yes

String

The name of the target inform based engine.

workflowName

Yes

String

The name of the workflow within the target inform engine.

context

No

Object

A JSON object ({…}) containing the context to pass to the target workflow’s workflowContext. By default , passes the triggering alert id within the context.

Example

The following example demonstrates typical use of Workflow Engine function sendSituationsToWorkflow.

Set the following:

  • engineName: “Situation Inform Engine”

  • workflowName: “Add Thread”

  • context: { “description” : “$(description)” , “severity” : “$EXPAND(severity)”, “count” : $TO_INT(count) }

The UI translates your settings to the following JSON:

{"engineName":"Situation Inform Engine","workflowName":"Add Thread","context":{"severity":"$EXPAND(severity)","description":"$(description)". “count” : $TO_INT(count) }}