Skip to main content

getCorrelationInfo

A Workflow Engine function that checks for the existence of correlation info for a Situation. If true, the action sets a workflow context available for subsequent actions. If you don't specify the contextName argument, it uses the default context item ciRelatedItems.

If correlation info exists and the subscriber (serviceName) has interest then the context item, it sets an array of CI items and returns true. For example:

{
    [
      {
        "external_id":"e801043c2f319050c9d1dc1a2799bbbb",
        "sig_id":111,
        "service_name":"ServiceNow",
        "properties":"{\"service_name\":\"ServiceNow-WFE\",\"external_id\":\"e801043c2f319050c9d1dc1a2799bbbb\"}"}]
      }
    ]
};

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.Install Moogsoft Add-ons

This function is available for Situation workflows only.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function getCorrelationInfo takes the following arguments:

Name

Required

Type

Description

serviceName

yes

string

External solution name. One of ServiceNow, Remedy, Cherwell, JIRA, Assyst, PagerDuty

contextName

no

string

Context name for retrieved CI. If not specified then defaults to ciRelatedItems.

Example

The following example demonstrates typical use of Workflow Engine function getCorrelationInfo. In this case we check for existence of correlation info for ticketing solution ServiceNow.

Set the following:

  • serviceName : ServiceNow

  • contextName :

The UI translates your settings to the following JSON:

{"serviceName":"ServiceNow"}

The action should be set to Forward the alert or situation as needed but in most cases it should be set to ‘Stop This Workflow’ on failure.

The function determines if correlation info exists for the specified target's Situation, returning false otherwise.