sendAlertToWorkflow
This action allows a triggering CEvent (alert or Situation) to send an alternative alert to a target workflow. The action extracts the alert_id from the specified field, fetches the alert from the database, and sends the alert to the target workflow. The target workflow then uses this referenced alert, not the originating Event, as its CEvent (trigger) context.
This allows an alert or Situation to call a workflow in a context other than its own. For example, it allows a Situation to call an alert-based workflow with the target workflow acting on the referenced alert.
This function is available as a feature of the Add-ons v2.3.5 download and later.
This function is available for alert and Situation workflows.
Back to Workflow Engine Functions Reference.
Arguments
Workflow Engine function workflowEngineFunction
takes the following arguments:
Name | Required | Type | Description |
---|---|---|---|
alertId | yes | string | The field containing the alertId to send. |
engineName | yes | string | The target situation inform based workflow engine. |
workflowName | yes | string | The target workflow within the target engine |
context | no | object | Optional workflowContext to pass to the receiving workflow. |
Example
Suppose a Situation has a reference to its “master” alert in custom_info.master_alert
and you want to execute a workflow named Escalate Master Alert in the Alert Inform engine for this alert while passing additional context.
In the Situation workflows:
sendAlertToWorkflow
alertId =
custom_info.master_alert
engineName =
Alert Inform Engine
workflowName =
Escalate Master Alert
context =
{ “reason” : “escalate” }
This would appear in the UI as:
{"alertId":"custom_info.master_alert","engineName":"Alert Inform Engine","workflowName":"Escalate Master Alert","context":{"reason":"escalate"}}
If custom_info.master_alert
contained “4967,” the receiving workflow (Escalate Master Alert) would be passed alert 4967 as its triggering alert (all actions would be against alert id 4967) with the workflow context containing the key “reason”
.