Declare Expression form - Completing the Change Tracking tab
This presentation is part of the Declarative Expressions Self-Study Course.
Transcript
The fields on the Change Tracking tab determine when and how the computation on the Expressions tab is performed.
It is important to understand that there are certain limits to change tracking.
- It only applies to properties on the primary page of the rule (i.e., the class that the rule Applies To). Changes to properties on other pages referenced in the expression or on the Pages & Classes tab are not tracked and do not trigger re-computation.
- The following actions can change a property’s value and do not trigger change tracking:
- Saving a rule
- Retrieving a property with either the Obj-List or RDB-List methods
Also note that if a message is present for a property (i.e., it is invalid), forward chaining stops.
If you do use java steps, be careful. They will trigger backward chaining, but not forward chaining.
See the Developer Help for more details.
Focusing on the rule forms now, let’s look at the options for the Calculate Value field one by one.
Option | Description |
---|---|
Whenever inputs change | This is the default value for this field and is the forward-chaining re-computation. The target property is recomputed when one of the expressions’ inputs change |
When used if no value present | This setting is with backward chaining. If another rule needs this value, it is calculated but only when the value is null, blank, zero, or does not yet appear on the page |
When used if property is missing | This is another backward chaining option very similar to the previous one but more specific. Computation only occurs when the target property is not present on the clipboard |
Whenever used | This is the third backward chaining option that causes re-computation even when the property already has a value. Obviously, this choice could be costly in terms of performance as the expression is evaluated upon every read of the target property |
When applied by a Rule Collection | This choice causes the expression to execute only when called by a collection rule. You should note that expressions of this type can be self-referential |
There are 3 options for the Execute this Expression field:
- Only when the top-level page is of the Applies to class – basically means that the expression will only execute if the property is on a top-level page.
- When the top-level page is of the Applies To class, or one of the following – this choice limits the execution of the rule to when the top-level page matches the Applies To class, is one of a specified list, or is of any descendent classes in the class hierarchy.
- Regardless of any pages it is embedded in – makes this rule completely "context-free." 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.