Close popover

Declare Pages Overview

Transcript

Rule-Declare-Page, or declarative pages, is an important construct in PRPC. Declarative pages allow you to define a page that will always be available during runtime, as well as an activity to run to populate and maintain the page.

Probably the most important aspect of declarative pages is that a page can belong to a single requestor OR can be shared across all requestors on the current node. Sharing pages across nodes can greatly improve performance when working with reference data that is expensive to retrieve.

Besides performance, another benefit of declarative pages is decreased development time as developers no longer need to programmatically setup ‘helper pages’ and continually check for their existence.

Another important aspect of declarative pages is that they are READ-ONLY.

See PRKB-24171 for more information on how declarative pages can be used to implement global resource settings.

To use declarative pages:

  1. Create an activity with an activity type set to LoadDeclarativePages. This activity populates the primary page with the properties it needs.
  2. Create a declarative page. Remember: Your declarative page must use the naming convention of Declare_.
  3. Complete the remaining declarative page options. You can specify the Page Scope as being Node or Thread.
  4. Set the Page Class for the actual page as it will be on the clipboard.
  5. Choose the load activity as you created before.
  6. Define the page structure, which defines if the page is a single, top-level page, or a list of pages, in which case a Code-Pega-List page will be created on the clipboard.

For thread level scoped pages, you can set a refresh strategy based on a time period or When condition.

For node-based page scope, you can only set the refresh strategy based on a time period, and you must set the access group under which the load activity will run.

For more details on constructing Declaratives Pages see the Declarative Pages PLC course.


100% found this useful

Have a question? Get answers now.

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