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...

Parameterized data page in pega

What is parameterized data page in pega ?

As we know data pages provide data for system to use on demand. On the first reference of data page, system creates a data page instance and loads data in clipboard.
Read more on data pages in pega

Passing parameters to data page (Parameterized data page) to fetch quick and exact data what you need on the situation from the source.

How to pass parameters to data page in pega

First we need to define parameters in "Parameter" tab of data page rule form.
how to pass parameters to data page in pega

Syntax to use parameterized data page

<datapagename>[<comma separated list of parameter name:value pairs>]
We can pass single or multiple parameters with comma separated.

parameter data page
Example to pass single parameter:  
If it is a single parameter, no need to specify the parameter name,we can simply pass parameter value.
D_ComplaintList[Param.requestType] - passing single parameter.
D_ComplaintList[.RequestType]  - if we are passing direct property (primary page) as parameter.
D_ComplaintList["ElectricService"] - passing direct value as parameter.

Where can we refer parameterized data page in pega

We can use data page with parameters to provide exact data in many of the rules in pega. Below are few of them:
  1. Property
  2. Data transform 
  3. Activity 
  4. When etc.

Passing parameters to data pages using a property

We can refer data page and send parameters in Property rule form if the property type is Single page or List page.
Passing parameters to data pages using a property
Scenario: When we create a new service request and wanted to check latest issue reported in the same location based on the Zipcode. 
We will see how pega will create this page and passes parameters to data page.
Clipboard page "PrevIssue" will be formed in two ways by passing parameters to data page.

1. Refer to a data page - SoR (system of Record) pattern

We have created a page property and referenced D_Previousissuesatthislocation data page and passed parameter "Zipcode".
Used this Page property in data transform which will trigger on flow action submit (post processing).
SoR data transform

sor pattern tracer
Clipboard structure - PrevIssue page. Pega provides matched instance reference to PrevIssue page.
SoR clipboard
Clipboard structure  - data page D_Previousissuesatthislocation, data page have matched result.
data page clipboard structure SoR
We can notice data page structure in Clipboard, 
D_Previousissuesatthislocation_pa346379500512985pz (pzPageNameHash) don't refer this way instead we can refer  D_Previousissuesatthislocation[Zipcode:Param.Zipcode].

2. Copy data from a data page - Snapshot pattern

Take same scenario but configuring page property with "Copy data from a data page" option selected in property rule form.
property snap shot pattern

tracer snap shot

Clipboard: We can see in clipboard PrevIssue page is copied data from data page for matched result.
Zipcode:12345 instance is copied to PrevIssue page which there is User Pages.
clipboard snap shot pattern

We can use these two patterns SoR (Refer to data page) and Snapshot (Copy data from a data page) with keyed access data pages.

See more on Keyed access data page in pega.

No comments:

Post a comment