Declarative Expression rules and backward chaining
This presentation is part of the Declarative Expressions Self-Study Course.
Transcript
Backward chaining executes declare expression rules when a value is needed for a property, as opposed to when inputs change. For example, a value may be needed because a property’s value is referenced in an HTML stream for display.
Backward chaining applies to declare expressions rules with the Calculate Value field set to one of the following:
- When used if no value present
- When used, if property is missing
- Whenever used
Think of it like this … the system says “I need property X, if it isn’t there, calculate it for me”.
For example: Area = Length x Width and is set up for backward chaining with the “Whenever used” option set on the Area property. If you try to display Area (even just in the property rule preview), the declare expression rule re-computes. This re-computation is driven by the use or referencing of Area, not by any changes in Length or Width.
If a value for Area is needed through backward chaining, but Length has no value, the chaining may continue using a declare expression rule to calculate Length, and so on. Alternatively, the application can prompt a user to enter a value.
Experiment with backward chaining using the following standard rules
- Work-.VerifyProperty flow action
- Work-.VerifyPropertywithListing flow action
- Work-.PromptGoalSeekProperty HTML rule
- Work-.VerifyProperty activity
The Property-Seek-Value method is the foundation of backward-chained processing. What is really important to understand is that the system will only execute the required calculations as needed, which can result in huge efficiency gains.