Decision Rules in Pega Refresher

Share Post

Decision Table:

A Decision Table in Pega is a rule that resembles a spreadsheet with rows and columns. It is used to test the values of multiple properties to answer questions. It is an instance of the class “Rule-Declare-DecisionTable”.

The columns in a decision table are condition properties, and the logical operator between columns is AND. The rows are condition values. You can use a decision table when you have to evaluate many combinations of the same set of properties or conditions to return one value or property.

To create a decision table in Pega, you can follow these steps:
1. In the header of Dev Studio, click Create > Decision > Decision Table.
2. In the Label field, enter a name that describes the purpose of the table.
3. In the Apply to field, select the class in which you want to create the decision table.
4. Click Create and open.

Decision Tree:

A Decision Tree in Pega is a rule that uses if…then…else decision logic to calculate a value from a set of test conditions organized as a tree structure. It is an instance of the class “Rule-Declare-DecisionTree”.

Each branch in a decision tree evaluates the property/operator pair against a single value to perform an action, such as return a value or evaluate a nested condition². Developers can use a decision tree when they must evaluate conditions on different properties that may be dependent on other conditions². Each branch in a decision tree is evaluated, and all branches that evaluate to true perform the action that is described after, such as continuing the evaluation to the nested condition.

To create a decision tree in Pega, you can follow these steps:

1. In the header of Dev Studio, click Create > Decision > Decision Tree.

2. In the Label field, enter a name that describes the purpose of the decision tree.

3. In the Apply to field, select the class in which you want to create the decision tree.

4. Click Create and open.

Map Value : 

A Map Value in Pega is a decision rule that uses a matrix structure to record decisions based on one or two ranges of an input value. It uses a one- or two-dimensional table to derive a result. 

Through cascading, where one map value calls another, map values can provide an output value based on three, four, or more inputs. This rule allows two properties, one for row and the other for column. The result of a map value can be a calculated value of row and column.

To create a Map Value in Pega, you need to complete the Configuration tab before the Matrix tab. Rules of five types can reference map values: In a flow, you can reference a map value in a decision task. In an activity, you can evaluate a map value using the Property-Map-Value method or Property-Map-ValuePair method. A Declare Expression rule can call a map value. A map value can call another map value. A collection rule can call a map value

please let me know if you are unable to implement or need help, you can comment below or connect/contact me in linkedin :   https://www.linkedin.com/in/bibhash-kalita-b477aa9b/

Leave a Comment

Your email address will not be published. Required fields are marked *