Why Data Page (or) Declare Page in Pega?
What is the use of Data Page and how it works actually? I have this question for long time in my mind. Now I have a clear idea about the use of Data Page.
Lets me share what is the Data Page actually do in pega.
What Declare Expression will do? When the property refereed in declare expression value is changed then declare expression will trigger.
What Declare On Change will do? When the property refereed in declare on change value is changed then declare on change will trigger.
What Declare Page or Data Page will do ? When the Declare Page is refereed in any rule at that time declare page or Data page will trigger.
For example,
Assume I created a data page named D_GetCustomerInfo . If I am using this page as step page in an activity step then data page will call and data source will execute.
Hope you understand the concept of Data Page. Lets do it practically.
Concept to implement: Have to load all the previous work items(existing case information) using Data Page.
Created a data page named D_LoadWorkRecords.
Provided Data Source as activity , and I mapped an activity named GetWorkRecords .
In the below image we are browsing all the work id from work table which status is not resolved.
In the Property set we are copying page list from WorkRecords to CaseRecords.
In the Property set we are copying page list from WorkRecords to CaseRecords.
CaseRecords is a Single Page property created in TGB-HRApps-Work class which refer TGB-HRApps-Work.
Now lets refer this Data Page in any activity and check whether data page has value at run time.
In the flow action Post-Processing activity I refereed this declare page.
Pages and Class Tab:
Since we refereed Declare Page on step 3 declare page trigger in step 3 and case data will load here.
Lets trace activity PostCustDetails and check our work.
Flow action completed and activity is get traced.
In the below image you can see In 4th step starting Property set Data page has no values.
In the end of Property set Data Page has values. CaseRecords(1) you can see in below image. So its working fine we can come to conclusion that data page will trigger when we refer the data page in any rule.
Total Number of Records fetched is 45 by data page activity Obj-Browse.
Hope you understand this post. If any doubt please ask in comment.
Good Stuff Mate :)
ReplyDelete