Moogsoft Docs

setSituationFlag

A Workflow Engine function that sets a flag for a Situation. If the Situation already has a flag set, using this action replaces it.

This function is available as a feature of the Workflow Engine v1.1 download. See Update the Workflow Engine for information on how to upgrade.

This function is available for Situation workflows only.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function setSituationFlag takes the following arguments:

Name

Required

Type

Description

flag

Yes

String

Flag to set.

Example

The following example demonstrates typical use of Workflow Engine function setSituationFlag. If you want to set the Situation's flag to TICKET_PENDING, enter the following:

  • flag: TICKETED

The UI translates your settings to the following JSON:

{"flag":"TICKETED"}

Given an object with the following flag:

{
    "situationFlags": [
        "TICKET_PENDING"
    ]
}

The Workflow Engine updates the object fields as follows:

{
    "situationFlags": [
        "TICKETED"
    ]
}