Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Declarative Expression rules and backward chaining

Updated on May 27, 2008

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.

 

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us