Skip to main content


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

Defining the pages and classes of a rule

Updated on November 18, 2021

Many types of rules can access or update information on various clipboard pages when they run. Most of these rule types include a Pages & Classes tab that you can use to provide important information about what your clipboard pages will look like during execution.

  • Setting up rule prompting during when you configure forms. For example, if you specified that a page belongs to the Work-class in the Pages & Classes tab of an activity, when the page is used as a step page, prompting shows results from the Work- class.
  • Configuring rule validation. The information specified in the Pages and Classes tab defines how rule references are validated during rule validation.
  • Applying the default class for list elements. When you define a list or group page on the Pages and Classes tab, the system automatically sets the class of those elements when new entries are added.

Guidelines

To complete a Pages & Classes tab, follow these guidelines:

  • Leave this tab blank if the other tabs of the rule do not reference any pages.
  • Complete this tab to describe the clipboard context expected at run time.
  • Page names are case-sensitive, so be sure to match the case of the page name.
  • Enter the name of each page referenced explicitly on the other tabs of the rule form. For rules that contain HTML or XML text, such as correspondence or HTML rules , the reference can be inside a JSP tag or directive.
  • To set the class of the primary page, add a row that has no value for the page name and the desired class name.
  • If you use the keyword Top on other tabs of the rule form, such as in embedded properties, add a row with the keyword Top in the Page Name column and the class of the top level page in the Class column. You frequently do this when the name of the top-level page name varies in different settings.
  • For an embedded page enter the full page name. You can also enter the full page name starting with the top-level page name or with the keyword Top. For List and Group arrays, use trailing (). For example:
    • myPage.ListA().PageA
    • myPage.ListA().listB()

    Page names must be absolute property references. Relative references, such as .myEmbeddedPage are not supported. Instead, use the keywords Primary or StepPage to make the path absolute. For example:

    • Primary.myEmbeddedPage
    • StepPage.myEmbeddedPage
  • You do not need to list all the clipboard pages expected to be on the clipboard, only those that are referenced in this rule.
  • For HTML rules, XML Stream rules, and other stream rules containing JSP tags, list all the pages identified in the HTML text, including system pages ( pxRequestor, pxProcess, pxThread, and their embedded pages, if mentioned).
  • You cannot use the keywords $ANY or $CLASS in the Class column.
  • Do not use the keywords $ANY, $CLASS, or $None in the Class column; these keywords are deprecated.
  • If the Class column is blank, the Applies To class of the rule is used by default.
  • For rules that run in the context of a primary page, you can leave the page name blank for greater flexibility. (The class of the primary page matches the Applies To key part of the rule.)
  • You must have classes for data pages defined on the Pages & Classes tab. When you add a parameterized data pages to the tab, do not use parameters or brackets.
Note:
  • The context at run time often differs from the context at design-time.
  • You can enter rows in the list in any order.
  • You cannot use the Top keyword in the Pages & Classes tab of a list view or summary view rule.
  • Using the Top keyword in a data transform does not reference the top-level page.
  • You must list embedded pages in the Pages & Classes tab if the class of the embedded page varies from the class defined for the property at run time.

Run-time processing

The pages that are present when a rule is running might vary from execution to execution. The system neither requires nor checks that all the pages listed are present each time it runs the rule. It only determines it can find the properties needed to perform the current execution.

In some situations, the class of a page may vary from execution to execution. If all the properties referenced are available in a common parent class, you can list the parent on this tab, even though the page belongs to a subclass.

For example, an activity may operate on a page named Customer that, in some situations, has the class Data-Account-Savings and in other cases has the class Data-Account-Checking. If all the properties that the activity needs — for example CurrentBalance and AccountOpenDate — are defined in the Data-Account- class, you can list Data-Account- in the Class column.

However, if the activity needs to access both checking and savings data at once, the activity needs to work with two pages — one of each class — with distinct page names.

Identifying pages in your application

Managing the number and names of clipboard pages referenced in your application is important. Using too many pages or omitting to remove the pages when no longer needed can add to the run time memory demand of your applications. Misspelling page names or having two copies of one page (with different names) can also hurt performance or make testing difficult.

Use the Data Designer Usage tab to see the pages that use a data type.

Special cases

Certain rule forms offer more capabilities for greater power and flexibility:

  • This functionality is not supported. Use a data page instead. For three rule types — Declare Expression, constraints, and when condition rules — you can define page names that start with the keyword locate and that use an activity to search or assemble the page needed. These pages are known as locatable pages.
  • For six rule types — including activities and correspondence — pages with names that start with the keyword prompt are known as indirect pages. This facility allows a calling activity to share multiple pages with a called activity, for example. When the called activity references a property on a page named promptALPHA, the system searches the clipboard for a page named ALPHA.
    Note: This feature has been deprecated.

Page names and reserved pages

A page is a data structure that holds name-value pairs.

Most pages are named; the names of pages may arise from any of four sources:

  • Literal values entered into a rule such as a parameter to the Page-New method.
  • System-created pages with reserved names and purposes, such as the requestor page.
  • Names used by convention in a collection of rules designed to operate together
  • Property names (for embedded pages)

Valid page names

A page name can contain only letters, digits, and the underscore character. Start the page name with a letter.

Several keywords identify elements in specific operations. Using keywords as a page name is not recommended: param, local, locate (unsupported), primary, steppage, mysteppage, top, parent, or current.

Do not use any of the following names or patterns as a page name, where an asterisk indicates one or more characters: pxNode, pxRequestor, pxThread, LISTVIEW_*, locate*prompt*, $*, px*, pz*, or py*.

Special page name prefixes

You cannot use certain prefixes and keywords as page names, as they have a special meaning:

  • local – Not a page, a keyword indicating that the name that follows the word "local" and the period is a local variable, not a property.
  • locate – A prefix to a page name (in lowercase), indicates that this page is retrieved or located at runtime through an activity of type Locate. This prefix is unsupported. Locatable pages have been replaced by data pages.
  • mode – Identifies an indirect page reference.
  • param – Identifies the parameter page for an activity. This page structure is not part of the clipboard.
  • parent – In the context of an embedded page, identifies the immediately containing page to which the embedded page belongs. This keyword might appear more than once in a property reference. You keyword is used in Declare Index rules, decision tables, decision trees, and map values. You can also use the PARENT keyword in the Step page field in activities. You cannot use this keyword in data transforms.
  • prompt – As a prefix portion of a page name, not a keyword, identifies an indirect page reference in a Call or Branch.
  • primary – In the context of an activity, refers to the primary page of that activity.
  • top – In the context of an embedded page, identifies the top-level page to which the current embedded page belongs.

The prefixes D_ and Declare_ in a page name indicates a data page, a page that is created and updated only by data page rules. The properties on this page are "read-only" to normal requestor processing. To avoid confusion with such pages , don't create pages named Declare_zzzzz or D_zzzzz in other processing.

Except as noted, case is not significant in keywords: Param.Country, PARAM.Country and param.Country all reference the same value.

Page names used by convention

Many standard activities and other standard rules use these page names by convention. To utilize these standard rules, follow these naming conventions in the rules you create.

Page NameDescription
NewAssignPage When a single assignment object is open on the clipboard, the page is named NewAssignPage. If your application involves multiple work items (or multiple assignments) on the clipboard, you can use other names.
pyCoverPage By convention in standard flow processing activities, when a single cover work item is opened onto the clipboard, the page is named pyCoverPage.
pyOutputCreated by Process API activities.
pyWorkPage By convention in standard flow processing activities, when a single (non-cover) work item is opened onto the clipboard, the page is named pyWorkPage.
RuleToRun Created during unit testing of a rule with the Run toolbar button. The class of this page matches the rule type. See Unit testing a rule with the Run toolbar button.

System-created pages

These top-level pages are present in the clipboard of every authenticated requestor:

Page NameDescription
Process page ( pxProcess ) A named page of class Code-Pega-Process containing system-wide information, such as information from the Data-Admin-System instance.
Requestor page ( pxRequestor ) A named page of class Code-Pega-Requestor. Created at log in and contains information about your access roles, RuleSet list, and TCP and HTTP protocol parameters.
Thread page ( pxThread ) A named page of class Code-Pega-Thread, identifies a named context of clipboard pages. The first Thread for a requestor is named STANDARD.
AccessGroup Contains information from the requestor's current access group (Data-Admin-Operator-AccessGroup class). This page does not exist for guest (unauthenticated) users.
Org Contains information from the requestor's organization ( Data-Admin-Organization class). This page does not exist for guest (unauthenticated) users. This page does not exist for guest (unauthenticated) users.
OrgDivision Contains information from the requestor's organization ( Data-Admin-Organization class). This page does not exist for guest (unauthenticated) users.
OperatorID Contains information from the requestor's Operator ID ( Data-Admin-Operator-ID class). This page does not exist for guest (unauthenticated) users.

Other

Page NameDescription
pyQueryResultPage Produced by execution of a list rule ( Rule-Obj-List rule type).

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