assignAndAcknowledge
A Workflow Engine function that assigns and acknowledges the specified user as the owner of the in-scope alerts or Situations. This includes the triggering alert or Situation and any associated alerts or 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.
This function is available for alert and Situation workflows.
The workflow sweep up filter applies to this function.
Back to Workflow Engine Functions Reference.
Arguments
Workflow Engine function assignAndAcknowledge
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 assignAndAcknowledge
. To assign and acknowledge with 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 and acknowldeges all alerts or Situations in scope to the “support” user.
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 acknowledges the alerts and Situations accordingly.
If at least one alert or situation is assigned and acknowledged to a user, the action returns true. Otherwise it returns false.