Declarative Expression rules and forward chaining
This presentation is part of the Declarative Expressions Self-Study Course.
Transcript
Forward chaining is what results when your expressions rules are set to recalculate ‘Whenever inputs change’.
In our example, if any one of the price properties change, the subtotals and total properties are recalculated.
In terms of benefits, forward chaining:
- Ensures the validity of dependent values
- Enables the expressions to set the subtotals to the sum of their constituent prices
- Ensures that anytime a price changes, subtotal and subsequently the total are updated
- Cuts down on number of executed rules as they are only executed as needed
Drawbacks could be:
- In PRPC version 4 and versions 5.1 to 5.3, declarative expressions must be declared on a top level page (the work object). From Version 5.4 this limitation has been removed.
- Rule execution cannot be turned off – you do not get to choose, the system does!
- The dependency network will not update based on external data changes. **For example, when Expression A = B + C, if B is set by a RDB call and the source data changes, A will not change. A manual step is required in this case.
** Declare pages can be used to trigger a call to database when a result value is used.