hasPRCAlert

A Workflow Engine function that returns true if a Situation has at least one alert with a Probable Root Cause (PRC) value set (rc_probability).

Optionally, you can specify a minimum percentage value for the probability. If the top PRC alert from the situation has a probability less than this percentage, the action returns false.

If no alert has a PRC value or if PRC is not running, the action returns false.

This action uses the MoogDbv2 API call getTopPrcDetails with a limit of 1 to return the “top” alert. This limits the results to the alert with the highest probability.

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 Situation workflows only.

Back to Workflow Engine Functions Reference.Workflow Engine Functions Reference

Arguments

Workflow Engine function hasPRCAlert takes the following arguments:

Name

Required

Type

Description

minPercent

no

number

The minimum probability % the returned alert needs for the action to return true.

Validated as a number between 0-100

Example

You can use the hasPRCAlert function before a createServiceTicket function to prevent the Workflow Engine from creating a ticket for a Situation for Situations without a PRC alert. This is effective for cases where you require a PRC alert for ticketing or notification.

Optionally you can supply a minimum percentage for the PRC alert using the minPercent argument. The action can prevent subsequent functions like createServiceTicket from creating ticket until there is an alert with at least the specified percentage PRC. For example, you could set the minPercent to 50%:

  • minPercent : 50

The UI translates your settings to the following JSON:

{"minPercent":50}