The clipboard comes up in almost every Pega interview, and usually as a string of follow-up questions. This post collects the common ones with short, accurate answers. For a hands-on look at the tool itself, see Pega Clipboard tool.
What is the clipboard?
Every connected requestor, meaning every user session, has a temporary memory area on the server called the clipboard. It holds the data the application is working with right now: the case being edited, the current user, cached reference data, and so on.
How is it organised?
It is a hierarchy of pages. A page usually has a name and a class, and it holds properties. Pages act as temporary copies of records from a database. They may have been read from a database, or may later be saved back to one. Pages can contain other pages, which are called embedded pages.
Quick questions and answers
| Question | Short answer |
|---|---|
| What is a top-level page? | A page directly under the clipboard root, such as pyWorkPage |
| What is an embedded page? | A page that lives inside another page, as a property of mode Page |
| What is a Page List? | An ordered list of embedded pages, accessed by number: .Items(1) |
| What is a Page Group? | A set of embedded pages accessed by a name: .Contacts(Home) |
| What are data pages? | Cached, on-demand pages named with a D_ prefix that hold reference data |
| What is the primary page? | The page an activity or rule runs against by default |
| How long do pages live? | Until they are removed, or until the session ends. Data pages also depend on their scope and refresh strategy |
| Is the clipboard shared between users? | No. Each requestor has its own. Node-scoped data pages are shared, and they are the exception |
Which pages are on the clipboard?
- User pages: pages the application creates, such as the case page
pyWorkPage. - Data pages: reference data with a scope of thread, requestor or node.
- System pages: pages Pega manages about the session and the environment.
A worked example
A clerk opens a loan case. The clipboard now holds pyWorkPage for the loan, D_Customer for the applicant, and a page list .Documents inside the loan page with three uploaded files. The developer expands each node in the clipboard tool to check the values, sees that .Documents(3).Type is empty, and finds the bug in a data transform.
Tips for answering
- Define the clipboard first, then its structure, then give one example like the one above.
- Mention that it is per requestor and lives in memory.
- Say that you use it together with the Tracer for debugging.
More in the Clipboard label.
No comments:
Post a Comment