setSituationServices

A Workflow Engine function that explicitly sets the Situation Impacted Services. The list of services to set can be explicit or can use the standard argument substitution. Optionally, you can replace the existing services with the specified list. By default, the specified services are added to the existing Impacted Services.

Services added to the system by this process have the description “Automatically added service”.

This function is available as a feature of the Add-ons v2.2 download and later.

This function is available for Situation workflows only.

The workflow sweep up filter applies to this function.

Back to Workflow Engine Functions Reference.Workflow Engine Functions Reference

Arguments

Workflow Engine function setSituationServices takes the following arguments:

Name

Required

Type

Description

services

yes

object

A list of services to add. Can include substitutions. If the substitution is a list then the action will expand this.

Example: [ $(custom_info.services) ]

Example

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

To set the Impacted Services to include (add) “myService”:

  • services : [ “myService” ]

  • replaceServices : false

The UI translates your settings to the following JSON:

{"services":["myService"],"replaceServices":"false"}

To add a substituted value (in this case the value of custom_info.service) in the highest PRC alert:

  • services : [ $PRC($(custom_info.service)) ]

  • replaceServices : false

The UI translates this to:

{"services":["$PRC($(class))"],"replaceServices":"false"}

To replace the current services with a list of services from an existing list:

Given a custom_info field “service”:

{ 
  "services" : "mail","network"]
}
  • services : [ “$(custom_info.services)” ]

  • replaceServices : true

The function expands this list into the the underlying list of services and applies these to the Situation.

The UI translates this to:

{"services":[ "$(custom_info.services")],"replaceServices":"true"}