Friday, 14 September 2018

Reviewing Application Data


While developing applications, you may need to review the data generated by your application. To verify that cases are processed correctly, review the data generated by your application using the Clipboard tool.

Data storage in memory

During case processing, each page remains in memory in a structure known as the clipboard.
The clipboard is the portion of memory on the server reserved by Pega for the data generated by applications.
The clipboard consists of all of the pages used to track the name-value pairs that represent case and session data.
As you run a process, Pega sends information to the clipboard, adding or removing pages and properties from memory.
Your application uses this information to populate fields on user interface forms, perform calculations, and evaluate decisions.

pyWorkPage

When debugging case behavior, you often need to view the case data that is in memory to determine whether the application is functioning as expected.
If your application functions in an unexpected way, viewing the data on the clipboard can help you identify the cause of the issue.
For example, if a declare expression returns an unexpected result, you can review the contents of the clipboard to determine if one of the input properties has been set with an unexpected value.
All the data generated as you create and process a case is stored on a clipboard page named pyWorkPage.
If a case is a child case, the clipboard also contains a page named pyWorkCover.
pyWorkCover contains case data for the parent case.

When you reference case data from another class, you must reference pyWorkPage to read case data.
An insurance quote case contains a data type to represent an accident record.
The data type contains a report to obtain the accident history for the customer requesting the quote.
The customer ID is on pyWorkPage.
The report must reference pyWorkPage to obtain the customer ID.
 
Clipboard tool layout and how to view data
1.Create a case and note the case ID.
2.On the Developer toolbar, select Clipboard to open the Clipboard tool. By default, when you open the Clipboard tool, the tool displays the thread that corresponds to the active tab in Designer Studio.


The Clipboard tool is organized into three parts: the header, the left pane, and the right pane.
Each Clipboard page has a toolbar.

Use the header to select the thread to view.
Each thread corresponds to a unique action currently managed by Pega.
The clipboard contains one thread dedicated to the Designer Studio environment.
Other threads are dedicated to open rule forms.
Pega assigns each open case a unique thread ensuring that the data for one case or action does not affect data for another case or action.

The left pane lists each page defined on the clipboard for the selected thread.
For each page, the Clipboard tool identifies the name and class of the page.
If a page contains embedded pages, an expand arrow is displayed to the left of the page name. To view the embedded pages, click the expand arrow.

Pages are organized into 4 categories:
User Pages - contains pages created due to user action, either directly or indirectly.
Data Pages – contains pages that cache data sourced from outside the application, such as data on previous purchases. Data pages are defined by data page rules.
Linked Property Pages - contains read-only pages created by linked properties, which contain information from data objects referenced by a linked property.
System Pages - contains pages that describe the current user session.

The right pane lists all of the properties defined on the selected page, and their values.
View data in memory.
Update property values.
Add new properties to the page to represent data not captured in your application to test application features that rely on data elements that have not been added to the case.
Load disqus comments

0 comments