You are on page 1of 2

T abbed Navigation for Screen Flow T ake Lesson

Chaining Expressions
When discussing expressions, the key concept to understand is change tracking. Forward chaining indicates that the
expression is computed when any of the source properties change. For example, Total = Quantity*Unit Price, the total
gets calculated when Quantity or unit price changes. However, if you request Total before either of them has a value
then the expression does not get calculated. In addition to the properties used in the expression we can also identify
additional properties in the additional dependencies field. The order in this array is not significant and the expression is
calculated when any of these properties change.

Backward chaining as the name suggests computes the expression calculation based on the target property. This can be
set in one of the 3 ways:

1. When the target property referenced does not have a value.


2. When the target property is not present in the clipboard.
3. Whenever the target property is referenced.

Obviously each of these has its own use but the system generates a warning when we use “Whenever used”. This
option, however can be used in some cases such as when the expression involves values from properties on multiple
pages or when the property is not referenced in many places in the application.

Declare expressions can be invoked procedurally by using a collection rule. When creating a collection rule, we can
include a declare expression along with other rules. If the declare expression is included in a collection rule then the
declare expressions rule should use the option invoked procedurally. Pega versions prior to 7.1.6 do not have this
option.
https://academy.pega.com/...ame=pyWorkPage&pzPrimaryPageName=pyWorkPage&pzTransactionId=3901c0197a345ada3e9f2fad51488bd9[4/29/2015 3:30:26 PM]
T abbed Navigation for Screen Flow T ake Lesson

If the declare expression used in the collection rule is chained to other expressions then we should use the option “When
applied by a rule collection”. This option is there in the product to support this use case and also for backward
compatibility.

https://academy.pega.com/...ame=pyWorkPage&pzPrimaryPageName=pyWorkPage&pzTransactionId=3901c0197a345ada3e9f2fad51488bd9[4/29/2015 3:30:26 PM]

You might also like