Declare Expression
rules
|
A Declare Expression rule has three key parts. The third key part — Page Context — can be blank. If at runtime the Target Property resides on an embedded page rather than a top-level page, complete the Page Context key part before completing the Target Property key part.
Leave the Page Context key part blank to define a context-free expression.
Field |
Description |
Type |
Select |
Applies To |
Select an internal or external class for this rule. The properties to be calculated can be in this class or in the class of an embedded page. If you select a class derived from the Embed- base class, leave the Page Context key part blank, and create a context-free expression. You cannot use a Rule-Declare-* class or any ancestor of the Rule-Declare- class (including @baseclass) here. You cannot use a class derived from the Code- class here. You can't create rules with Work- as the Applies To class. Instead, choose a class derived from Work-, such as a work type or work pool container class. In many cases, the Save As dialog box defaults a container class for this field. See Copying standard rules from the Work- class. |
Target Property |
Identify a property that appears somewhere
within the object of the class in the Applies
To key part. Precede the name with a period.
Select a property of mode You can't use a Declare Expression rule to compute a property for which the Cannot be declarative target box (on the Advanced tab) is selected.
You can't use
symbolic page names such as |
Page Context |
Optional. Leave this blank if the
Target Property property has mode
Otherwise, identify a
Invoices.pyOrders().pyItems().pyItemNames() The length of the value in this field is limited to 64 characters. Forward chaining does not create embedded pages where none existed before. Declare Expressions that have a non-blank Page Context and that use top or parent keywords do not execute unless there is at least one pre-existing embedded page at each level of the page context. For more information and an example, see Pega Developer Network article PRKB-21038 Declare expression rules using the TOP or PARENT keyword depend on existing pages to run. |
For general information on the New form, see Completing the new rule dialog box. For general information on the Save As form, see How to enter rule keys using Save As.
When searching for Declare Expression rules, the system:
Time-qualified and circumstance-qualified rule resolution features are available for Declare-Expression, Declare-Constraints, and Declare-OnChange rules.