Skip to main content

situationDelta

A Workflow Engine function that returns true when attributes have changed. This is based on the previous_data metadata, which Moogsoft Onprem sends with the situation object in a situationUpdate event.

Only use this function in conjunction with an entry filter that includes the event_handler trigger for "Situation Updated".

This function does not check the values of the attributes, only if the attributes have changed. As standard de-duplication changes attributes, use this function carefully.

Moogsoft recommends placing situationDelta in an engine dedicated to handling Situation Updates and other Situation event handlers. This prevents updated Situations from re-entering the processing chain through standard Situation Workflows. Contact your Moogsoft Onprem administrator for more information.

This function is available for Situation workflows only.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function situationDelta takes the following arguments:

Name

Required

Type

Description

fields

Yes

Object

List of attributes to check for change. Accepts granular custom info attributes.

Example

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

You want to check if the moderator of a Situation has changed before performing subsequent actions in your workflow. You could use an entry filter to check for a specific moderator, but in this instance the value of the moderator is not relevant, only that it has changed.

Using a separate Workflow Engine to prevent unwanted re-entry, you set up a workflow with an entry filter that includes the event_handler trigger for "Situation Update" and the moderator as "Unassigned":

(event_handler = "Situation Update") AND (moderator != "anon")

Set the following:

  • fields: moderator

  • Forwarding behavior: Stop this workflow. This ensures that if the Situation owner has not changed, subsequent actions in this workflow do not execute.

The UI translates your settings to the following JSON:

{"fields":["moderator"]}

If the Situation metadata shows that the “moderator” has changed, the function returns true and the Situation is forwarded to the next action in the workflow.

If function does not detect a change of ownership, the function returns false and the forwarding behavior prevents subsequent actions in the workflow from executing.