

#GUARDRAILS IN PEGA CODE#
It is not recommended to remove the out-of-the-box warnings, as they are intended to check if developer's code is complying with good practices. (2) Remove out-of-the-box Guardrail warnings

Write a Java code as below, and configure When condition.Īfter this implementation, if you leave description of flow action rule blank, system will give a severe warning as below. For example, if you want to add warnings to Flow action, create it in Rule-Obj-FlowAction class. Since it is Final, you can never override it). (1) Adding your custom Guardrail warningsĬreate an activity named "CheckForCustomWarnings" in the Rule class where you want to add warnings to (don't be confused with "CheckForWarnings", which should already exist in all Rule classes.
#GUARDRAILS IN PEGA HOW TO#
In this post, I am sharing how to customize (add or remove) Guardrails warnings. If the description property has value, exit the activity otherwise set the properties for the warning.Robotic Process Automation Design Patterns In the first step of the activity, check for the missing description of the data transform rule. The second is a java step that adds warning using a standard called "addWarning" If the description property has value, exit the activity otherwise set the properties for the warning.

Step 2: Configure the activity with a Java step to call the standard function rule addWarning.

Save the activity "CheckForCustomWarnings" in the rule type class of data transform i.e., "RULE-OBJ-MODEL" Consider an example, we want add a guardrail warning to the data transform, if its don't have any description in the history. This activity will be triggered from one of the standard activity called StandardValidate .Ĭopy this rule to the class of the required rule type which we want to add the warning. When ever we try to Save/ SaveAs any rule in pega, it calls the standard activity called CheckForCustomWarnings for validating the rule. Step 1: Creating an activity named CheckForCustomWarnings in the Applies To class of the rule type. To add a rule warning condition involves two steps: Hi, Custom guard rail warnings can be added to augment the standard warnings. One such example would be when creating an activity, each activity steps' description field must be used to clearly define the purpose of the step.ĭoes anyone have detailed examples or steps on how to configure this or other custom/extended Guardrails and messages? I feel it would be a tremendous help for this project and creating a collection with detailed how-to would be a great resource for everyone on future projects. Some appear to be older versions not applicable to 8.3 and mention newer methods. It appears it is not a complicated process but I could use a very detailed process to provide additional clarity to at least get one example running. However, we have not found enough clarity or detailed configuration steps in currently existing documentation from any of the previously posted resources in community or academy. We have created a list of implementations we would like to start with and have seen the Pega "Guided Development Through Guardrails" and other similar posts. We have discussed creating custom guardrail messages to alert and provide details to client developers when deviating from project prescribed best practices. Robotic Process Automation Design Patterns
