Skip to main content

checkSituationFlag

A Workflow Engine function that returns true if the specified flag is set for a Situation. For example TICKETING, or LEAVE_MANUAL_DESCRIPTION.

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

This function is available for Situation workflows only.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function checkSituationFlag takes the following arguments:

Name

Required

Type

Description

flag

Yes

String

Name of the flag to check for.

Example

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

If you want to check if a Situation's flag is "TICKETED", enter the following:

  • flag: TICKETED

The UI translates your settings to the following JSON:

{"flag":"TICKETED"}

Given a Situation with the following flag:

{"situationFlags": ["TICKETED"]}

The function returns true, since the object's flag matches "TICKETED".

Now consider this Situation:

{"situationFlags": ["TICKET_PENDING"]}

In this case the function returns false, since the Situation's flag does not match "TICKETED".

As a subsequent action you can set the flag using setSituationFlag.