Skip to main content

deltaEvent

A Workflow Engine function that returns true:

  • If the specified event fields differ from corresponding fields in an existing alert.

  • When an error occurs in the delta check.

  • When no alert exists.

Returns false when it detects no changes.

Uses shallow object inspection which compensates for list ordering and object key ordering, but may still result in an inaccurate response.

This function has an inherent call to willDeduplicateAlert so you do not need to call it first.

This function is available as a feature of the Workflow Engine v1.0 and later.

This function is available for event workflows only.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function deltaEvent takes the following arguments:

Name

Required

Type

Description

fields

Yes

Object

An array of core and custom info fields to check. Objects may produce unexpected results during comparison

Example

The following example demonstrates typical use of Workflow Engine function deltaEvent. If you want to check for differences in the services in the custom_info.eventDetails.services field between the alert and deduplicating events, set the following:

  • fields: ["custom_info.eventDetails.services"]

The UI translates your settings to the following JSON:

["custom_info.eventDetails.services"]

Given an alert with the following fields:

"custom_info": {"eventDetails":
                    {"services": ["APPSERVER"]}
                   }

An event with the following fields returns true:

"custom_info": {"eventDetails":
                    {"services": ["NETWORK"]}
                   }

An event with the following fields returns false:

"custom_info": {"eventDetails":
                    {"services": ["APPSERVER"]}
                   }