Featured post

GetNextWork functionality in pega

What is GetNextWork in pega? Pega provided a functionality to get the most urgent assignment(task) for user to work on. This is configured o...

Data pages in pega

What are data pages in pega

A data page loads data to the clipboard for system to use. System can access  data from the data page on demand. On the first reference of a data page (in data transform, activity etc), Data page will be created in clipboard and loads the data to use.
Structure of the data page:
We can create a data page with two types either a single page (holds a single object/page) or List (Page List - holds multiple objects/results/pages) type.
First important thing in data page is Mode(after loading a data page if the data is readable, editable or savable) 
We can create a data page in three modes.
  1. Read Only (Node,Requestor and Thread)
  2. Editable     (Requestor and Thread)
  3. Savable      (Requestor and Thread)

Scope of data page in pega

Defines in which context data is loading onto the clipboard and data accessibility to the users. We can load a data page in three contexts (scopes).
  1. Node         (Read Only)
  2. Requestor (Read Only, Editable, Savable)
  3. Thread      (Read Only, Editable, Savable)
We need to understand data page scope in pega
data page scopes in pega

Node level data page in pega

If a data page scope is defined as Node means whenever node is restarted on the first reference of this data page, system will create a data page and loads in clipboard.
node level data page in pega
  • All the requestors who are currently in that particular Node can access the data from this Node level data page.
  • We can create a node level page in "Read Only" mode only so that data is same for all the requestors and can not be modified or updated.

Load authorization for Node level pages

We need to define "Access group" in Load management tab of data page rule and this will only appear for Node level pages.
When pega needs to create a Node level data page first time in the clipboard and to load the data to the data page, it needs to run the Sources like Load Activity, Data transform, Report definition or connector. To run these rules system should have access to rulesets and versions. Data page rule's ruleset version and source rule's ruleset version should be visible to the system through access group. By this way system is getting temporary access to the rules through access group. Pega will open access group - application  and see the ruleset stack to make sure ruleset versions are there. 
access group in node level data page

Requestor level data page in pega

When a data page is loaded on Requestor scope(level), all the threads opened by this requestor can use data from the data page.
For example from above picture:
Requestor 1 is having two threads means requestor 1 opened two work objects in two tabs, pega creates two threads ( we can see 2 threads in clipboard for each work object).  Thread1(Work object 1) and Thread2 (work object 2) can use the data from the clipboard
 
let's see below example:
Crated two Service Request cases in pega S-2002 and S-2003 and pega created two threads in clipboard. 
requestor scope data page
Two work objects can use D_ServiceRequestList data page which is in Requestor level.
requestor level data page pega

Simply, all threads for Current Requestor1 scope(all the work objects)  can use the data from data page. 
If Requestor2 is using the same data page on the same node,data is accessible to the threads (work objects) which are opened by Requetor2.

Thread level data page in pega

When a data page is loaded on Thread scope(level), data is restricted to particular thread even though requestor have multiple threads.
For example 1: Requestor2 have two threads (two work objects) and each work object will have its own data page instance on the clipboard. Each work object will access this data page as often as needed while processing the work. Same data page in two threads but data might be different. Data will be populated onto the data page for each work object.
We can go for thread level data page where the data is unique to each work object and don't want to share the data across multiple requestors.
For example 2: A CSR (Customer Service Representative)(requestor/operator) is working on insurance application and can receive and handle a call form any customer anytime. Each time when CSR receives a call from the Customer he opens/creates a work object which needs to fetch customer data from external system. Suppose in this case we have a data page D_CustomerInfo. We need to have this data page as Thread level because the customer information must be unique. 
CSR received a call from Customer John and opens a work object (CS-1) and fetched data from external system to Thread level data Page D_CustomerInfo.
Next CSR received a call from customer Mark and opens a work object (CS-2) and fetches data from external system to Thread level data Page D_CustomerInfo.
Both the work objects are opened by Same requestor (CSR) and pega creates two threads for two work objects (CS-1 and CS-2).If we go to the clipboard and see the data page, data might be different from CS-1 to CS-2, because pega populates data specific to the work object (thread).

Read Only data page in pega

When we set a data page mode as Read-Only, it can not be modified and data page will be there in "Data Pages" in clipboard.
We can set ReadOnly mode for all data page scopes (Node, Requestor and Thread).

Editable data page in pega

When we set a data page mode as Editable, it can be modified and data page will be there in "User Pages" in clipboard where pyWorkPage is there. When it initially referenced pega will create a data page with Read-Write access in User pages. Later we can edit the data page and save to DB.
For example: Service Request work object (S-2004) is using Editable data page (D_ComplaintList) for complaint list.
editable data page in pega

When it is referenced in work object process, pega creates it and puts in User Pages in clipboard.

editable data page pega

Editable option is only available for Thread and Requestor scope. We can not define refresh strategy for editable data pages. 

Savable data page in pega

We need an activity to save data to data base, by using savable data page we can save the data directly to the data base without using an activity. pega provides a smart shape to save data during case processing.
We can achieve this feature in different ways. 
1. Flow - Where we can use smart shape  "Save data page smart shape"

2.Flow action post-processing
flow action - savable data page

3. By using "Save-Datapage" method in activity
Save-Datapage  method in activity

Data page refresh strategy in pega

When it comes to refresh strategy data pages with ReadOnly mode can have refresh strategy. Both editable and Savable data pages doesn't have refresh strategy.
data page refresh strategy in pega

Reload once per interaction

If selected, system will refresh the data page once per user interaction (1) and ignores 2 and 3 refresh strategies as illustrated in above picture. This option only available when the page scope is Thread or Requestor.

Do not reload when

This is optional, if we refer any WHEN rule and if it evaluates to true then pega will not refresh the data page. If it evaluates false, system refreshes the data page once per user interaction. This option only available when the page scope is Thread or Requestor.

Reload if older than

To set the timer when exactly the data page should be expired and re-loaded. Enter positive numbers in Days, hours, minutes and seconds. When system first loads the data page timer will start from that point of time. Data page will only be refreshed when it is accessed by other requestor after expiration time, will be refreshed only once per user interaction.

How to clear data page in pega

how to clear data page in pega
In data page "Load Management" tab we can see a button "Clear data page". Once you click on this system will clear the data page.
If the data page is parameterized data page, We have an option to delete all instances or only those with specific parameter values.

See on Keyed access data page in pega.




5 comments:

  1. Very much informative... Good explanation...images helps a lot to understand.. Good job Ramesh thanks for educating people though your posts.

    ReplyDelete
  2. Good Post Ramesh.
    what is the significance of post load processing? any real time scenarios ?

    ReplyDelete
  3. Nice super explanation Ramesh, specially in Save date page your theory part superb ,Goodjob Ramesh.

    ReplyDelete