Back Forward Warning icon

When you save a rule form and a warning icon ( or ) appears, one or more warning conditions were detected. Warning conditions do not prevent the rule from saving.

Warning conditions identify unexpected and possibly unintended situations, or practices not recommended, or variances from best practices. Each warning condition has an associated severity (Severe, Moderate, Caution) that indicates the extent of variance from the recommended practices (guardrails). Consult the messages in the errors-and-warnings section (Errors-and-warnings section) for additional details on each warning.

Reviewing warnings for rules in an application

To review all the warnings for the rules in an application, use the Guardrails landing page.

The standard decision tree Embed-Warning.pxWarningDetails controls whether warnings of a specific type are reported in the Guardrails landing page. By default, all are reported; you can override this decision tree to choose which to omit. This decision tree tests the property pxWarningType, which can have values indicating the source of the warning, such as:

Warnings are maintained as instances of the Index-Warning class and saved in the pr_index_warnings database table.

Justifying warnings

If you have the pxAllWarningJustification privilege (usually through an access role in your access group), you can justify warnings. The standard access role PegaRULES:SysAdm4 provides this privilege.

To justify a warning, expand the warning section in the rule form and click the Justify Warnings link () on the right hand side of the section. The Justify Warnings window opens for you to provide text describing the justification for the warning. Justifying a warning in a rule is a useful way to communicate to project stakeholders the acceptable reasons for not altering the rule to remove the warning condition.

Warnings when creating a rule of a certain rule type

Some rule types have other, preferable alternatives that you can use to accomplish the desired outcome. For example, a report definition is preferable over a list view rule.

For those rule types that have preferable alternatives, a warning message is displayed in their New forms. The warning message alerts you to the alternative. Those rule types whose New forms display a warning message are:

Note: Form rules and JSP rules are deprecated.

If you want to remove display of the warning in the New forms for one of the listed rule types, override the @baseclass.pyRuleCreationWarning decision table in your application, and remove the rule type from the decision table.

If you want to provide a custom warning for a rule type not in the list:

  1. Override the @baseclass.pyRuleCreationWarning decision table and add the rule type to it.
  2. Override the standard section @baseclass.pyRuleCreationWarning at the rule type's class level and provide the custom warning inside the section. See Rule-Obj-Activity.pyRuleCreationWarning for an example. (A best practice is to use a field value to provide the text for the message in the section.)

Extending warnings

For many rule types, you can extend the set of warnings with a custom activity named Rule-ZZZZ.CheckForCustomWarnings, where Rule-ZZZZ is a rule type. PDN article PDN 21872 How to create a rule warning and Standard activities — Extension points

Definitions guardrails
Related topics Application Guardrails landing page
Standard rules Atlas — Standard decision tables
Atlas — Standard activities — Extension points

UpDefinitions — W