More about Data Page rules
|
|
On the Clipboard tool display, data pages appear as a group below the UserPages
group.
Whenever possible, data pages load asynchronously. This lets a user take action on a work item while other content is still being loaded.
In some cases, as when the page is referred directly in an activity or a data transform, the page loads synchronously. Data pages loading asynchronously cannot run declarative expressions, triggers, and other rules that belong to a declarative network. For example, you can enable executing declarative expressions in a background requestor; but if the declarative expression refers to properties defined in external named pages which are not present in the background requestor, then the declarative expression may not execute.
Follow these guidelines to create an activity referenced in the Load Activity field of a data page:
Page
, set the Applies To key part of the activity to the class in the Page Class field (on the Definitionpage-new tab), or an ancestor class of that class. If the Page Structure field is List
, set the Applies To key part to Code-Pega-List.LoadDeclarativePage
as the Activity Type.List
, this top-level page has the class Code-Pega-List). This becomes the primary page of the activity. In the activity, add at least one property value to the top-level page. Do not use the Page-New or Page-Remove method for that page. (You can't use the Page-Remove method in activities of this type.)param.pyPageName
.When a load activity runs, it executes in the requestor session of the requestor that attempted to access a property on the data page. Depending on the application, a data page might load only once (the first time anyone accesses the page) and remain unchanged until the node is shut down, or might reload every few seconds in multiple requestors. If frequently executed, a resource-intensive or slow load activity may affect the performance of the requestors that access the data page.
If during execution of the load activity, any exceptions are uncaught, the exception is added to the page as a message, and is also passed up to the calling activity.
Except to the load activity, data pages are read-only. Any attempt to modify a data page (with Property-Set, Page-Copy, Page-Clear, or other processing) produces a ReadOnlyException
exception.
The system removes a data page (with a scope of Node
) only when the system is shut down for that node (or when the rule is deleted).
The system removes a data page for a Thread when the requestor of that Thread logs out.
The system removes any data pages with a specific name when you save a Data Page rule form that has a key (Page Name field) that matches that name.
You can't use the Page-Remove method or the Clipboard tool to delete the page.
Use a Data Page rule to hold global resource settings. These allow service rules and connector rules to be identical in multiple systems, such as a test system and a production system, while using different ports, URLs, and servers.
To assess the performance impact (in your own requestor session) of data page processing, review the Full Details display of the Performance tool. This page includes three elapsed times statistics, three counts, and three CPU time statistics:
All times are in seconds. CPU times are available only on Windows-based servers, and only after appropriate configuration.
Because data pages with a Node
scope occupy JVM memory, they can reduce the memory available for other processing. For example, a shared page of class Code-Pega-List may contain dozens of embedded pages each with dozens of properties.
Periodically, the master agent computes the total memory space for data pages (with a Node
scope). If this total is more than 5% of total JVM memory, the master agent adds a PEGA0021 alert to the Alert log recording this fact. The acts as a warning that memory and performance may be degraded by the data pages.
You may set a higher or lower threshold for the PEGA0021 alert:
1. Add a line to the prconfig.xml
file:
<env name="DeclarePages/MemoryUsagePercentLimit" value="nn" />
where nn is an integer between 1 and 20.
2. Redeploy and restart to effect the updated limit.
Note: As an alternative to the prconfig.xml file, you can use Dynamic System Settings to configure your application.
See How to create or update a prconfig setting.
See PDN article Understanding the PEGA0021 Alert.
To view declarative processing (by your own requestor session) with the Tracer tool:
CTRL+T
to start the Tracer. Tracer output includes a line when a load activity starts, and for each reference to a data page.
Note: Although not prohibited, as a best practice, don't choose Declare_ or D_ as the initial portion of a page name in activities. Using a page name of this form does not create a data page; data pages are created only by Rule-Declare-Pages rules.
Through a prconfig.xml
file setting, you can review or extend a list of prohibited page names. See Completing the Create New dialog.