1. Pega Test Topics
Decision Rules % of Exam: 6%
■ Decision Rule Types
– Describe the following types of decision rules and their function
Decision Tables
Decision Trees
Map Values
When Conditions
– Compare different decision rule types and identify when to use them
Exam Blueprint 11
■ Fork and Decision Shapes
0 Explain the difference between fork shapes and decision shapes in a flow
Definition.
A decision rule is usually called from a flow and is used to make a decision about the
path the flow should take. It can also be called from a declarative rule.
A Decision table contains one or more rows, each containing test conditions and a result
to return. Evaluation proceeds top-down. When all cells are true for a row, the result of
that row is returned. If no row is true, the table returns the Otherwise row’s result. Empty
cell defaults to a true. Decision tables are instances of the Rule-Declare-DecisionTable
class.
A decision tree uses if/then logic to return a value based on rows of property values, and
computations (including comparisons). It is an instance of Rule-Declare-DecisionTree
class.
A Map value rule is a rule that converts one or two input values to a calculated result
value using a matrix to look up the result. Map values can be cascaded – one map value
calls another which calls a third, etc. Thus an output can be decided based on more than 2
inputs. Map value rules can be called from a flow, another map value, an activity (using a
Property-Map-Value method), a declare expression. They are instances of the Rule-Obj-
MapValue rule type.
2. A When Condition rule defines a true-false test based on comparing one or more
property values with constants or other property values. It is an instance of the Rule-Obj-
When rule type.
When to use what:
1. Use map values when you need to make decisions based on *ranges* of one or
two inputs. Note: map value rules can be cascaded.
2. Use decision table when the tests are based on the same set of properties and data
is easy to see in a tabular form.
3. Use decision tree when the tests tend to be for different properties and the
conditions are complex (like nested if/then/else conditions).
4. Use When rules when you want a true/false test result.
Fork and Decision Shapes
1. Use fork when you use a when rule to make the decision
2. Use a decision shape when you use a decision tree or decision table to make the
decision.