More about data page rules
Benefits of using data pages
Data pages can improve performance and reduce memory requirements when all or many requestors in an application need to access information.
For example, a data page might hold last night's closing U.S. stock prices in a Value Group property indexed by ticker symbol, so that the property reference D_Stock.Price("IBM") is the closing price for IBM shares. The first time each evening (after the 4:00 P.M. New York stock market close) that a requestor attempts to access the page, the Pega Platform automatically loads the page with the latest end-of-day prices. The page can remain unmodified in memory until the next day's closing.
You can also reference data pages using parameters, and the data page can create on the clipboard unique instances of itself for each unique reference, with data related to the parameter values. For example, a single data page, D_Customer, can create many instances of itself on the clipboard as your application requires. Each instance has exactly and only the information about that particular customer.
In other situations, data values are not static but can change infrequently. The Pega Platform automatically checks the data page contents (using a when condition rule) before each property access to see whether a fresh recomputation is needed. For example, a page might list the part numbers or SKU numbers of items that are out-of-stock, extracted from an inventory control system. Recomputation is needed only as often as an out of stock condition begins or ends, not each time the inventory changes.
You can assign access control policies to classes, which restrict retrieving data from those classes. If a node scope data page is defined on such a class, a severe guardrail warning is shown. Also, if a node-level data page is populated, and the data page object class has access control policies assigned to it, a severe security alert is shown.
Data page removal
A data page with a Node scope is removed when the Pega Platform is shut down for that node or when the rule is deleted.
A data page with a Thread scope is removed when the requestor of that Thread logs out.
Data pages with a specific name are removed when you save a data page rule form that has a key ( Page Name field) with a matching name.
Supporting Global Resource settings
Use a data page rule to hold global resource settings. These allow service rules and connector rules to be identical in multiple Pega Platform instances, such as a test system and a production system, while still using different ports, URLs, and servers.
Data pages and clipboard pages
Data pages (known as declare pages in versions prior to PRPC 7.1) have many similarities with other clipboard pages. They are accessed the same way, so it is not necessary to write a Java step to access the data on a data page. Data pages also contain the same kinds of data as regular page: properties, embedded pages, and so on.
-
Clipboard location
-
Read-only data pages (all scopes) appear in the data pages (version 7.1) or the declare pages (versions 5.1-6.3 SP2) area of the clipboard and not under user pages or system pages.
-
Editable data pages (thread and requestor scope) appear in user pages.
-
-
Edit operation – Data pages can be read-only or editable.
-
Read-only mode: You cannot add or remove data after the data pages are created.
-
Editable mode: You can modify the data after the data pages are created.
-
-
Naming convention – The names of data pages must begin with the string Declare_ (for versions 5.1-6.3 SP1) or either D_ or Declare_ (for version 7.1). Other types of pages cannot begin with these strings.
-
Creation – A data page is automatically created whenever any properties on the page are accessed, if the page does not already exist. You do not have to explicitly create these pages by using the Page-New method or other methods. Data pages with parameters are loaded only when mandatory parameters are provided.
- Update procedure – Data pages can have an automatic refresh strategy, which ensures that their contents are up-to-date.
-
Database persistence
-
Unlike other pages (such as work item pages), read-only data pages cannot be saved.
-
Editable data pages can be saved.
-
-
Passivation – When a requestor is passivated, all of that user’s information is serialized and temporarily saved to persistent storage. If this user's clipboard contains any read-only data pages, those pages are not saved. Instead, the system deletes these pages when it passivates the requestor, and then re-creates them whenever they are next referenced by that requestor (after the requestor is reactivated). Editable data pages are saved like normal pages.