MatthewA4496 Member since 2018 3 posts
Posted: 3 months ago
Last activity: 3 months 2 weeks ago

What is the easiest way to retrieve an array of all Adapter objects in a Pega Robotic Automation Studio solution?

What is the easiest way to retrieve an array of all Adapter objects in a Pega Robotic Automation Studio solution?

For example, the StartMyDayController component has the method GetStartupApplications(), which returns an array of <StartMyDayApplication> objects, from which each represented adapter and its properties are available. However, this method only returns adapters whose StartMyDay property is set to Manual or Automatic. I am looking for something similar, except it must return ALL adapters in the solution.

The ASOManager component has a GetAllApplications() method, but this method only returns an array containing the string Name of each adapter in the solution, so this will not work for me.

The issue we are trying to solve for is not straighforward, but I will describe it as best I can below:

1. Chrome adapters remove themselves from the SMDController's ShowStartDialog UI after being started until either the specific adapter's Stop() method is called, or ALL Chrome windows are closed. Our solution is an RDA, so we decided it best to not try to go down the path of determining when each adapter's Stop() method should be called. This was an issue for our use case because we needed our agents to be able to re-open applications they closed (accidentally or otherwise) without having to close EVERY chrome window first. 

2. Our workaround for this issue was to include a 'dummy' adapter for each Chrome adapter. The dummy adapters use StartMyDay: manual, while the 'real' adapters use StartMyDay: none. This causes the dummy adapters to show up in the SMDController ShowStartDialog UI while the real adapters do not. The dummy adapters start the real adapters when StartMyDay() is called. Because the dummy adapters are never started, they remain in the list, and each Chrome adapter contains the necessary logic to prevent more than one instance of the application from starting.

3. Unfortunately, this workaround led to another issue: we can no longer use the SMDController to allow our agents to save/restore the size and position of Chrome apps, because the Chrome apps that are 'open' are not technically the same ones that are in the SMDController.

4. The solution we are looking at for this issue is using a persistent preferences file stored inside the project folder to save size/position data for all adapters. We plan to feed the name/size/position data to the SMDController's OrganizeApplication() method (Or each adapter's MoveAndResizeWindow() method), but the initially described issue is a roadblock to this.

As I see it, to solve this current issue, we'll need to do one of the following:

  • Prevent Chrome apps from removing themselves from the ShowStartDialog UI after being opened
  • Grab an array of all adapter objects in the solution, not just the SMD Adapters

Any input is appreciated.

Pega Robotic Desktop Automation 19.1 Robotic Process Automation Technology Services Robotics System Architect
Share this page LinkedIn