Skip to main content


A Workflow Engine function that allows a set of Situation flags to be removed simultaneously based on a regular expression match.

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

This function is available for Situation workflows only.

Back to Workflow Engine Functions Reference.

Flag definition syntax

Flags are defined using the following syntax:

  • An equality check (case and whitespace sensitive).

  • A positive regular expression

  • A negative regular expression

An equality check has the same action as the removeSituationFlag action.

A positive regular expression (case insensitive):


A negative regular expression (case insensitive):


For example, given a Situation with the following flags:


A positive expression for Email.* would be


A negative expression for email (remove all flags that aren’t email) would be



Care needs to be taken when defining a regular expression to ensure it is not too “greedy” - use anchors (^,$) as needed.


Workflow Engine function removeMatchingSituationFlags takes the following arguments:








A regular expression using the “/<pattern>/” and “!/<pattern>/” syntax. Flags matching this expression will be removed.


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

Given a Situation with the following flags:


and a requirement to remove all flags that start with “email” (e.g. those set via the email integration):

  • flags : /^email/

This would appear in the UI as:


When executed this would remove the “EMAIL” and “EMAIL_99” flags from the Situation.