Complete this tab to determine the conditions that cause automatic recomputation of the
expression. These conditions affect how often the computation on the
Expressions tab is performed.
Note: Declare expressions that are created as of Pega Platform 8.3 do not
include the Change tracking tab. To use the legacy declare expression
Change tracking tab, click .
Note: Change tracking applies to properties on the primary page — the page that matches the
Applies To key part of the rule. Changes to properties on other pages referenced in the
expression or on the Pages & Classes tab are not tracked and do not trigger
recomputation.
Additionally, the following operations that can change a property value do not cause change
tracking to occur:
- Saving a rule form that contains a property
- Retrieving a property with the Obj-List or Obj-Browse method
- Retrieving a property with the RDB-List method, unless the ApplyDeclaratives parameter
of that method is selected
Note: Forward chaining operates only when the source properties are not marked as invalid. If
a property has an associated message, forward chaining halts.
Note: Changes made to a property value within a Java step of an activity do cause backward
changing computations to start, but do not cause forward chaining computation.
Field | Description |
Target Property Data |
Select to determine how often
Pega Platform
recomputes the
value of the Target Property (identified in the second key part).
|
Calculate Value |
Select an option to determine which events cause this rule to run:
- Whenever inputs change
- (Default). Forward-chaining recomputation. The target property is not
recomputed when the property is used as a source, only when one of the
expression inputs change. If the target property is not present on the page
when needed or is present but has no value, the Declare Expression rule does
not run.
- When used if no value present
- Compute when the value is null, blank, zero, or does not yet appear on the
page using backward chaining. Assuming the computation results are not null,
later requests for the target property do not cause the Declare Expression
rule to run.
- When used if property is missing
- Recomputation using backward chaining when the target property is not
present on the clipboard.
- Whenever used
Just-in-time recomputation even when the property already has a value,
using backward chaining. Caution: This choice ensures that the
target property value matches the computed value at the start of every
activity step, by evaluating the rule upon every read access of the target
property. Because this choice can be costly in terms of performance, a
warning icon appears when you save the rule form. Note: During backward chaining computations, if the Otherwise section of a
decision tree or decision table, or the Default row in a map value
referenced in a Declare Expression rule can be computed, but properties
needed for other parts of the form are not defined, the Otherwise value is
returned as the value of the rule. - When applied by a Rule Collection
The target property is computed only when the defined Declare Expression
rule is invoked by a
collection rule. The chained expressions also are evaluated if
they too are set to "When applied by a Rule Collection."
For example, if the defined rule is TotalCostAfterTax=TotalCost*(1+TaxRate)
where TotalCost=ItemCost*Quantity , then this expression is run only when a
collection references this rule. In this case, TotalCost is also calculated
if the properties on it were set to "When applied by a Rule Collection." This option supports self-referential expressions, for example, MyProperty=.MyProperty+1 Note: This option is compatible with versions earlier than PRPC 7.1.6. - When invoked procedurally
The target property is computed only when an independent
collection rule
directly invokes the target property. If the
defined Declare Expression rule is chained into another expression that is
set to "When invoked procedurally," the chained expression will not run.
For example, if the defined rule is TotalCostAfterTax=TotalCost*(1+TaxRate)
where TotalCost=ItemCost*Quantity , then this expression is run only when a
collection references this rule. In this case, TotalCost is not calculated
if the properties on it were set to "When invoked procedurally." This option supports self-referential expressions, for example, Note:
As a best practice, select
Whenever used
when the
expression involves values from properties on multiple pages.
|
Additional Dependencies |
Optional. Enter property references to identify additional properties (in the
same page context) to be tracked. Order is not significant. If not blank, changes to
any of the properties cause this rule to execute.
This array appears only when
you select
Whenever inputs change
for the Calculate Value field.
|
Context Execution Behavior |
Select one of three settings to further define which situations cause this
expression to be evaluated:
- Only when the top-level page is of the Applies to class
To execute this rule only if the property is on a top-level page. Note:
Do not select this option if the Applies To key part of this rule
identifies a class derived from the
Embed-
base class; by
definition, pages of such classes are never at the top-level.
- When the top-level page is of the Applies To class, or one of the
following
- To restrict execution to contexts in which the top-level page matches the
Applies To class, one of a specified list, or any descendent classes in the
class hierarchy.
- Regardless of any pages it is embedded in
To execute the rule regardless of the page context, making this rule
completely "context-free". Note:
If you select this option, you cannot use the
Top
or
Parent
keywords in the computations on the Expressions
tab, either explicitly or in decision rules referenced on that tab.
Caution: The third selection can produce high execution frequencies.
Select the most restrictive value that meets your application requirements. Note:
If this
Pega Platform
system was upgraded from Version 5.2
or earlier, execution of context-free expressions is disabled by default. Enable
them through changes to the
prconfig.xml
file or Dynamic System
Settings. See
More
about Declare Expression rules.
|
Execute this Expression | |
Allowed top-level classes |
This array appears only if you select the second choice (
When the
top-level page.. .) for the Execute this Expression field.
Enter a list
of classes. Execution occurs if the top-level page has a class that exactly
matches any class on this list, or is a descendent of one of the classes on this
list. Do not list the Applies To key part here; that class is included
automatically. |