When you save a rule form and a warning message appears in a section on the rule header, 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).
To review all the warnings for the rules in an application, use the Guardrails landing page.
The standard decision tree Embed-Warning.ShowWarningOnForm 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:
Java
— an activity contains a Java stepAPI 02
— an activity uses the Version 3 PublicAPIWriteNow
— An activity step includes a method with an immediate database write operation rather than a Commit method.Warnings are maintained as instances of the Index-Warning class and saved in the pr_index_warnings
database table.
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 error 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.
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: US-4256
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:
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 How to create a rule warning and Standard activities — Extension points .
guardrails | |
Application Guardrails landing page | |
Atlas — Standard decision tables
Atlas — Standard activities — Extension points |