Every connected Pega Platform requestor (including browser-based users, even unauthenticated guest users) has an associated temporary memory area on the server known as the clipboard. The clipboard has a hierarchical structure, consisting of nodes known as pages, most of which have a name and an associated class. Pages act as buffers or temporary copies of object instances (of that class) that are copied from, or might later be stored into, the Pega Platform database or another database.
Use the Clipboard tool when developing and debugging to:
- Examine property values and messages associated with them
- Find the information necessary to reference a property — the page and property names
- Quickly update, add, or delete page properties
- Quickly start activities
- Search for properties or property values in all or selected pages
Access the Clipboard tool by clicking Clipboard in the Dev Studio developer toolbar. As you interact with the Clipboard tool at your workstation, you see a static snapshot copy of your clipboard, which resides in memory on the server.
The Clipboard tool is available only to users who have access to the @baseclass.clipboardViewer privilege. Action menu items that update the clipboard contents are available only to users who hold the @baseclass.clipboardViewerUpdate privilege.
The standard access role
provides these privileges.
Clipboard tool for debugging
Several methods manipulate the clipboard. As you execute activities that affect your clipboard, you can examine the results with the Clipboard tool.
For example, when you execute an activity that contains a Page-New method, you can see the resulting named top-level page in the User Pages section. If you execute an activity that uses the Property-Set method (on a named clipboard page), you can see the new values.
Pega Mobile offers a clipboard view similar to the clipboard that you use on your Apple Safari desktop emulator in Dev Studio. Useful for trouble-shooting and debugging your mobile app, the clipboard is grouped by User, Declare, Linked Property, and System pages.
The Mobile Clipboard is available only to users who have access to the
privilege. The access roles
In the Safari desktop emulator, access the clipboard by using a tap and hold gesture on the mobile app. Display the clipboard for the main content panel and modal/overlay windows. Tap and hold does not display the clipboard for the main navigation panel, the toolbar menu, or a menu bar in a section. You can also add the clipboard as a navigation menu item.
See the Pega Community article Mobile Clipboard.
- Using the Clipboard tool
The Clipboard tool displays two panels.
- Setting property values with the clipboard
Maintain the best quality of your application by testing it with the Clipboard tool. To test or debug your application, set values for the properties that you need to inspect, and then check whether these elements behave in an expected way.
- Adding a user page to the Clipboard
To add a user page to the clipboard, do the following.
- Measuring clipboard size
The clipboard display shows the contents of the clipboard, but not its size in bytes. Large clipboards can affect performance because memory in the Java Virtual Machine (JVM) supporting the Pega Platform holds the clipboards of all requestors.
- Indirect pages
An indirect page is a page that the system finds by searching the clipboard at run time. The page reference to an indirect page starts with the keyword prompt followed by the page name.