Scope of data pages in pega with example

  Data pages in Pega

We can use the data page when the data is constant and common across requests and requestors. The scope of data pages in Pega determines how widely the data can be accessed and how long it is retained in memory.

The Pega data pages in Pega work as below.

1. When the requestor requests data 

a) Moreover, look up the clipboard for page

b) if page is there on clipboard

c) Copy from here done.

d) if page is not there on clipboard

2) Execute the source rule to query the data source and retrieve it onto the clipboard.

Advantages of the Data Page

1)However, the number of hits to the database was reduced from N to 1.

2)Number page on clipboard reduced from N to 1.

3)The number of times sources execute is reduced from N to 1.

4)The time taken to load the UI is reduced.

5)The overall performance of the application has improved.

Details about the Data Page

1)A data page is a cached page shared on the server’s clipboard.
2)The data page is an instance of Class Rule-Declare-Pages.
3)It can be created under the Data Model category.
4)Data Page name must start with D_ or Declare_5)
5)Before the Pega 7 version, data pages were referred to as declare pages.

A Pega data page can be available in one of two structures.

Page: If this is the data page to hold a single instance
Page list: This data page holds multiple instances.

Object type: Data Page reference class.

Furthermore, data pages can be accessed in one of the following modes:.

Read only:

However, these data pages get created on the clipboard under ‘Data Page’; they cannot be updated or deleted. We go for read-only mode  When business users should not maintain data.

Editable:

The system creates these data pages on the clipboard under ‘User Pages’. We choose this mode when business users need to manipulate the retrieved data.

Savable: 

Moreover,this data page must insert or update the data into a table. However, we can call this data page from activity using the Save-Data Page method or flow using ‘the save Data’ page flow shape. These can be updated or deleted.

Refresh Strategy:

We specify the duration in days, hours, minutes,  however seconds to refresh the data page from the server’s clipboard.

Reload once per interaction:

Any interaction  that a user requests the Data page will be refreshed.

Clear data page Button:

When we click on this, the data page gets deleted from the clipboard.  Moreover, Clicking on this button causes PRPC to internally call the OOTB activity ‘FlushDeclarativePage’.

Source:

Data Page When it is called, it runs a source rule to perform something. The sources are as follows:

1)Activity
2)Report Definition
3)Data Transform
4)Connector
5)Look up (for page structure data page)
6)Robotic automation
7)Robotic desk top automation.

Scopes of the Pega Data Page: 

1.Thread:

Furthermore, this data page will be available for sharing only within one specific work object multiple times. But not available for other work objects.

2. Request Scope:

However, this data page will be available for sharing across multiple work objects in a single requestor session. But not with other requestors.

3. Node:

Consequently, multiple requestors who log on to the same node can share the data page, although they cannot share it with requestors on other nodes.

Advantages of the Data Page:

1) Share data as per the scope.
2) Execute the source rule only once.
3) Hit the data source (database, file, service, etc.) only once.
4) Create only one page on the server’s clipboard.

As a result of all this, the application’s performance improves.

Editable data pages are not available at the node level.

This is because other operators should not modify editable data pages.

Moreover, Node-Level Data Pages must need an access group to be specified. Access Group Required

Other scopes, like threads, do not require access groups, only requestors do.

Editable Data Pages:

Why is node scope not available for editable data pages?

One requestor should send the modified data to another requestor.

In addition, that’s why the PEGA PRPC environment will not show up for node scope or editable data pages.

Savable:

Therefore, you can use this data page to insert or update data in tables.

We can call this data page from

1. Flow using the save page flow shape

Scope of data pages in Pega
Scope of data pages in Pega

2. An activity can call it using the Save-Data Page method

Conclusion

In conclusion, by understanding and appropriately setting the scope of data pages in Pega, you can effectively optimize data access and improve performance in your Pega applications.

More topics on technology click here

Leave a Comment