Access reference data at real time

From PegaWiki
Access real-time reference data using page properties / This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

Access reference data at real time

Description Access reference data at real time
Version as of 8.1
Application Pega Platform
Capability/Industry Area Data Integration


Access reference data that is used in the application at real time to eliminate the possibility of stale data. It is recommended to follow a declarative and non-procedural approach to access reference data in order to avoid duplicating similar routines at multiple places, and to promote a centralized data access mechanism.

Consider a simple use case where a Loan Application Case uses the Applicants information. You can retrieve the applicant’s information by using a unique identifier. You must design this retrieval of the applicant’s information so that the data loads at real time and on demand.

You can access the reference data by using the following features:

1.     Data pages

2.     Linked properties

Data page[edit]

Data pages provide greater flexibility to access reference data. You can also use data pages to access external data that is sourced from a non-Pega application. You can configure a page property to refer to a data page that sources the information. You can use this page property across the application without any procedural code to load the referenced information.

Page property configured to refer a data page

The following image shows the definition of a page property, ApplicantInfo, in a Loan Application case. This page property is configured to access the data by referring to a data page. The value of the parameter to the data page is held in another property, ApplicantID.

If ApplicantID is populated with a valid value, you can then use this page property on UI rules, such as sections, or processing rules, such as data transforms, to refer to the applicant’s information.

The following image shows a page property sourced from a data page that is referred from a data transform.

Page property referring a data page, used in a data transform

Linked property[edit]

A property that holds the value of a key to an external record in the system is called a linked property. This property is a single-value (scalar) property, but by configuring the Data access to automatically refer to a class instance, the property behaves like a page that holds the information of the target record.

The following image shows the definition of the linked property, Applicant, in a Loan Application case, where the property holds the primary key (PersonID) of the Data-Person class record. If the reference class has more than one key, the values for the other keys can be passed from other properties that hold the value.

Property configured to reference a class instance (Linked property)

The linked property appears as a scalar property on the case clipboard, but you can view the corresponding page that it refers to under Linked Property Pages in the left pane of the clipboard viewer.

If the linked property is used as a single-value property (from rules such as sections or data transforms), then it renders the actual value held in the property. However, if it is used as a page (for example, .Applicant.Name, from rules such as sections or data transforms), then it holds the corresponding record and acts as a page. An example is show in the following image:

Linked property used as a page in a section

Recommendations and limitations[edit]

  1. Referencing data pages is the recommended approach to use instead of using linked properties.
  2. Linked properties provide an alternative to using lookup data pages or Obj-Open in activities.
  3. References to properties within linked property pages do not show anything unless the appropriate key value is set on the linked property.
  4. Linked property pages remain on the clipboard until the next commit operation is performed, which reduces the memory footprint. Use linked properties on an as-needed basis.
  5. Linked property pages are not automatically removed from the clipboard while the thread that initiated it is active. It is recommended to use them sparingly.
  6. Overusing linked properties can cause a large amount of data to load into the clipboard, for example, referring to a linked property from each item in a long UI list in which each row refers to a unique record. Exercise caution while designing such use cases.
  7. Linked properties do not support dynamic class referencing. The property must be customized in the implementation layer to specialize the class.