Skip to main content

assignModerator

A Workflow Engine function that ssigns a user as the moderator of the in-scope Situations. This means the triggering Situation and any associated situations captured by a sweep up filter.

Specify users as follows:

  • User Name

  • User ID

  • A workflow context key with a user name or user ID value.

To identify the user from a workflow context key, include .workflowContext in the path. For example workflowContext.userName.

This function is available as a feature of the Add-ons v2.1 download and later. See Install Moogsoft Add-ons for information on how to upgrade.Install Moogsoft Add-ons

This function is available for Situation workflows only.

The workflow sweep up filter applies to this function.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function assignModerator takes the following arguments:

Name

Required

Type

Description

user

yes

string

The User ID or User Name to assign as owner.

Example

The following example demonstrates typical use of Workflow Engine function assignModerator. To assign a specific user, set user field to the User ID. For example "support":

The UI translates the settings to the following JSON:

{"user":"support"}

The Workflow Engine assigns all in-scope Situations in scope to the moderator “support”.

If you have populated the workflow context with the User Name or User ID, you can retrieve the owner from context. For example if the workflow context contains the following:

"userName" : "support"

You can specify the workflow context path in the user field as workflowContext.userName.

{"user":"workflowContext.username"}

In this case, the Workflow Engine retrieves the username "support" from the workflow context and assigns and the Situations accordingly.

If at least one alert or situation is assigned and acknowledged to a user, the action returns true. Otherwise it returns false.