Skip to main content

Asset Globals

Pega Robot Studio provides a way to manage global variables across your project, called Globals. When working with Assets, you can use Asset globals to manage variables or components within an Asset. Globals and Asset globals otherwise function similarly, with the only difference being that of scope.

For example, a developer creates an Asset for an application that requires a user to be logged in. To track the log-in state, the developer adds a boolean variable called IsLoggedIn to the Asset globals. Then, in each Asset method, the developer uses the variable to check if the user is currently logged in before proceeding with the automation.

Just as with project Globals, you can also use Asset globals to store components that you want to reuse within your Asset. For example, you can add a ToastNotification component to the Asset globals for use as all-encompassing messaging within your asset.

To add a Global to an asset, on the Interface tab, click the Asset globals button and then drag the global to the Globals list. The item is stored in the Globals folder of the asset, as shown in the following figure:

 

The asset globals with example elements: variable and toast notification.

Check your knowledge with the following interaction: 


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice