How Configuring Keyed Data Pages in Pega 8

In this post you will learn How to Configuring Keyed Data Pages in Pega 8.

Keyed Data Page:

  • Retrieving data for application use can make processing more efficient by reducing the number of server trips by using a keyed data page.
  • Data will be preloaded in memory and results can be immediately displayed.
  • By referencing the keyed data page which requires a value is provided for the key.
  • The first time the data page is referenced, all the data is loaded according to the data source configuration and stored on the page despite providing a key.
  • The key is then used to locate the specific instance on the data page and returns only the matched result to the caller.
  • When another request to the data page with a different key value is made, the results are already on the data page.
  • The system only needs to locate the correct instance on the page, and not database trip is necessary.
Refresh strategy:
  • Based on business needs, a page’s refresh strategy may be configured to make trips to the data source whenever data needs to be updated on the data page.

Note: Choosing between a non-keyed data page and a keyed data page depends on the number of requests that occur before the data in the server becomes stale.

Configuring keyed data pages:
  1. Define the data page Structure as a List.
  2. Select Access pages with user defined keys.
  3. If you want the data page to return more than one instance, select Allow multiple pages per key to filter a large list to create a smaller list.
  4. Specify the Page list keys used to access the list entry or list entries.

keyed data page configuration pega

Note: A keyed data page serves as an alternative to having two separate data pages.

Data access patterns:

Data access patterns provide simple mechanisms to manage data in a Pega application effectively.

Pega supports three data access patterns for use in application.

  • System of Record
  • Snapshot
  • Reference
System of Record:
  • The SoR pattern provides access to data stored in another system or application.
  • The case does not contain a copy of the data. Instead, the application references the data from the source when needed.
  • This pattern helps to ensure that the data displayed in the Pega application is current.

keyed data access sor pattern pega

  • In the Data access section of the property(Page or Page List) record. select the Refer to a data page option to implement the SoR pattern.
  • A new data page is created on the first reference to the property.
  • The property only contains a reference to a data page, as show below.

pega keyed access data page sor pattern

  • With the SoR pattern, the data reloads according to the refresh strategy specified on the data page.
  • Whenever a data page parameter is updated, a new data page is created. The property then points to the new page.
Snapshot pattern:
  • The snapshot pattern copies data into the case.
  • when you need to copy data to a case at a specific point in time, then use the snapshot pattern.
  • Once you copy the data to the case, the data is not retrieved from the source again unless the request parameters change.

keyed data page snapshot pattern

  • In the Data access section of the property(Page or Page List) record. select the Copy data from a data page option to implement the Snapshot pattern.
  • The first time the property is referenced, the data page is created, and the data is copied to the property.
  • You may also choose to specify a data transform for data mapping in Optional data mapping.
Reference pattern:
  • The reference data pattern is used often to populate UI controls, such as drop-down lists.
  • The value selected by the user is copied to the case.

keyed data access reference pattern

  • If the data page contains information that applies to multiple cases, you can set the page scope to node to save memory by sharing the contents of the data page between requestors.
  • With the reference pattern, the data reloads according to the refresh strategy specified on the data page.