Skip to main content

sendSituationToWorkflow

This action allows a triggering CEvent (alert or Situation) to send an alternative Situation to a target workflow. The action extracts the sig_id from the specified field, fetches the Situation from the database, and sends the Situation to the target workflow. The target workflow then uses this referenced Situation as its CEvent (trigger) context. Thus the target workflow runs actions on the referenced Situation and not the originating event.

This allows an alert or Situation to call a workflow in a context other than its own. For example, it allows an alert to call a Situation based workflow with the target workflow acting on the referenced Situation.

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

situationId

yes

string

The field containing the situationId 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

A alert has a reference to its “parent” Situation in custom_info.parent_situation. We want to execute a workflow named “Close Parent Situation” in the Situation Inform engine for this Situation passing additional context.

In the alert workflow:

  • sendSituationToWorkflow

    situationId = custom_info.parent_situation

    workflowName = Close Parent Situation

    context = { “reason” : “close” }

The UI translates your settings to the following JSON:

{"situationId":"custom_info.parent_situation","engineName":"Situation Inform Engine","workflowName":"Close Parent Situation","context":{"reason":"close"}}

If custom_info.parent_situation contained “447,” the receiving workflow (Close Parent Situation) would be passed Situaiton 447 as its triggering Situation (all actions would be against Situation id 447) with the workflow context containing the key “reason”.