Questions about the new project-level Globals approach in Pega Robotics Studio R25

Hi everyone,

I’m currently migrating several solutions from Pega Robotics Studio 19 to R25 and have some questions about the new Globals approach.

In Studio 19, every solution had its own Global Containers. In R25, however, each project contains a single Globals item by default, so global variables have effectively moved from solution level to project level.

I’m wondering what the recommended best practices are for this new architecture.

1. Reusing adapter solutions across multiple projects

In Studio 19, I could easily reuse an adapter solution in multiple projects because each solution had its own Global Container.

In R25, the global variables are created at the project level. If I copy or move an adapter solution from Project A to Project B, the required Globals are no longer present.

What is the recommended way to build reusable adapter solutions in R25?

2. Resetting all Globals

In Studio 19, I used the ResetState method on the Global Container to clear all global variables at once.

When I try the same approach in R25 and perform the ResetState method on the Global container folder, I receive the following error:

“No component is associated with this connection block.”

Has the recommended way of resetting global variables changed?

Is there now a supported way to clear or reset all variables in the Globals project item, or is the expectation that every variable must be reset individually?

I’d appreciate any guidance or best practices from anyone who has already migrated to R25.

Thanks!

Hi Robin,

To re-use application projects in multiple projects in v22 and R25, you would use Assets. Here is a link to the documentation Working with Assets.

There are 3 types of Assets available:

  • Application (contains a single Application - self contained logic)
  • Utility (used for sharing utility automations not tied to an application)
  • Project (used for sharing a sub-project)

Our recommendation is when creating from scratch a new Application do this using an Application Asset. However, when moving from v19 to R25, the smoothest transition will be to convert your sub-projects to Project Assets . Here is the documentation on this Strategies for converting 19.1 projects into Project Assets. If you follow this guidance before upgrading your 19.1 projects, the Upgrade Assistant will identify Project Assets that match the ID of your 19.1 sub-projects and replace them with Assets. So, there is prep work required before you start upgrading …

Here is a workflow you can follow when upgrading:

  1. Identify the the projects in your 19.1 solution that will be reused - these will become Project Assets.
  2. Create a new solution for each candidate project in v19 - 1 project per solution.
  3. Convert each solution to R25 as a standalone project - each of these projects will be where you will edit the Project Asset going forward.
  4. Deploy each new R25 project to Robot Manager as a Project Asset - do not deploy these as Projects.
  5. When you have all of your Project Assets ready, you then convert your base v19 solution to R25. Check the Use assets if available option.

Each Project Asset will have its own Globals and the resulting project will look and feel very similar to your v19 solution. If you need to make changes to any of your Assets, those changes would be done in the master project you created in Step 3. After making changes deploy the new asset version to Robot Manager and then you can update the asset in any project which requires the update.

If you have more questions, let us know.

Jeff

In v22 and R25 there is no longer an option to reset all Globals in a project. I will add this to our enhancement request list.

We made significant changes to Globals when moving away from v19. Having all Globals in a single container makes it much easier to maintain. Folders were added to the container to allow for better organization.

Hi Jeff,

Thank you for your detailed response. We really appreciate you taking the time to explain the recommended migration approach.

I have a few additional questions:

  1. If we decide to migrate our projects as-is without taking Assets into account, my understanding is that it will no longer be easy to replace an adapter solution with a newer version.

    During the migration, a Globals.pGlobals file is created. This file contains new references to the Global containers and global variables for each solution. These references receive new, unique IDs, which are different for every migrated project.

    As a result, if we were to overwrite the solution folder with a newer version of the solution, the references to these Globals would no longer work.

    My question is: if we initially migrate everything as-is, is it still possible to replace an existing adapter project with a Project Asset at a later stage? If so, would this require manually replacing the automation blocks and Global variables?

  2. In step 3, you mention upgrading the individual projects to R25.

    Are there any additional actions we should perform within those projects? For example, should we move the existing Globals to Asset Globals, or can everything remain as-is?

  3. I’m also curious about how step 5 works.

    If we migrate one of our use-case solutions and enable “Use assets if available”, does the Upgrade Assistant check the Project ID of the Assets deployed to Robot Manager to determine which Asset should replace each project?

    If the migration works this way, will the references to the automations and Globals continue to work automatically after the replacement?

Thanks again for your help!

That would be greatly appreciated. Having a ResetState option for the Globals container would allow us to reset all Global variables in a single step, instead of having to build and maintain a separate automation that manually resets each variable.