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 - Best practices

Updated on May 27, 2008

This presentation is part of the Declarative Expressions Self-Study Course.

Transcript

There are two best practices to consider when using declarative expressions:

  1. First, Pega recommends never setting the target properties of declarative expressions through any manual process.  They should always be calculated using the declarative expression. If you are declaring the calculation method for a property, there should be no valid reason to calculate it procedurally in a different way.  If you need to vary the calculation, build conditions and alternatives into your declarative rules.
  2. Select Whenever used when the expression involves values from properties on multiple pages.

Full rule resolution does not apply to declarative rules prior to PRPC version 5.4.  If you want to calculate differently in different circumstances, you have to design accordingly.  A few options to consider include:

  1. Using class inheritance and overriding – specialize your expressions just as you would any other rules.
  2. Version your rules – Use RuleSet versions to specialize in a similar fashion.
  3. Use the Conditions options in the rule itself to add ‘circumstances’.

 

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