System of record (SOR) pattern in Pega
What is a System of Record?
System of record (SOR) is the term used for an information storage system. A system of records is, typically, a database management system, which is an authoritative source of data for specific information. This is also known as the Source system of records(SSOR)
What is System of Record data access pattern?
The SOR access pattern is used when an application access data stored in another system or another application. This pattern ensures application always access the latest information stored in SOR. As Pega application or case wants to access the latest information so data is not copied into the application or Case.
When to use SOR access pattern?
Use system of record pattern when a case wants to access the data for which is not to be stored as part of the case and need to call the latest information whenever needed.
Pega cases usually store data within the case itself in form of a blob column. But, there are many scenarios where the information is not stored in the case. The case needs to access an external database or, external system or, an external application to access the information. In such scenarios, the information should not be copied into the Pega case because creates a duplicate data set. When the information will be updated in SOR, then Pega will have redundant data. Pega case needs to access the latest information so only the Primary Keys of the data is stored in the application.
For example. Consider a multinational company storing information of Employee in an SAP system. All the processes of HR are managed in the Pega application. In this scenario, Pega cases will store only the Employee ID of an Employee in Pega cases. Whenever HR, wants to initiate the Insurance Renewal process of that employee, his latest contact information and personal information will be fetched from SAP System.
Implementation of System of Record Pattern.
It is assumed a Data model already created as per requirement, so that D_Pages can be created in the relevant class.
Steps to configure SOR Data access pattern
- Create a D_Page of type List or Page.
- Configure source to fetch required information. Usually an integration needs to be configured here.
- Create a property rule, type corresponding to data page type.
- In Data Access section of the property record. Select Refer to a data page
- In Data Page: field, Select the DataPage configured in the above steps
- If you created parameterized DataPage, Enter Parameters for it. Do not hard code the parameter. Refer a property in which value for parameter is stored.
- Use this property in the case.
Example Business Scenario.
An Insurance application stores it customer information in external system. Customers are allowed to change their email, phone and address at any time. So whenever a communication needs to be send to customer their latest phone, email and address should be fetched.
Requirement Analysis
As the application wants to send communication to the most recent email, phone and address so, the Pega case should not store this information. SOR pattern should be used.
How system of records data pattern works?
When the property is referenced, Pega checks its Data Access option. As Refer to a data page is selected, it informs Pega that data should not be stored in the property. Then it identifies the DataPage mention in the property. When a property is referenced for the first time, a new DataPage is created in the clipboard based on the parameters passed. Property populates the information referred by the page. The property always points to the latest version of the DataPage.
Reloading of Data with SOR pattern
In system of record pattern, the data reload happens in two scenarios.
- Data will be reloaded based on refresh strategy mentioned on the Data page
- If there will be change in the parameters of the data page. Whenever Data Page parameters are updated a new data page will be created and property will point to the new Data Page.
Can SOR pattern be used when data is stored in Pega itself?
Yes, When data is stored in Pega, it means Pega is the system of record. As a best practice, in this scenario too, SOR data access pattern must be used. It can be possible that customer may decide to change the system of record from Pega to any external application. In such a scenario, the application will not break as only the Source of the Data Page will be changed.