cancel
Showing results for 
Search instead for 
Did you mean: 

Attach Stage - Attaches succesfully, then throws exception same stage

BenKirimlidis
Level 7

​Hi,

Have had a problem within Object Studio.  Attach stage successfulyl attaches but also throws an exception, how can this be possible?

I have a BOT that attempts to interact with an application, before any action is taken, first the robot will Attach to the window.


The attach page works by getting the current connection state, if unattached, will attempt to attach,  if attach is unsuccessful will attempt up to 3 times before throwing an exception.

In studio, works 100% of the time, when run from control room works 99.99% of the time.  Apparently randomly, the Attach navigation stage will throw an exception but also successfully attach (???), so when the page circles around and attempts to Attach again it will thorw an exception as it is already attached.

The Bot was not attached beforehand, because if it were it would have sidestepped the attach.

Hot fix was to check if attached before attempting to attach again (hindsight makes this very obvious), however, why would an Attach navigation which works in the process literally 0.1 seconds earlier and up to a few thousand times in this session suddenly throw an exception but also successfully attach?

Some notes:

This does not happen is the studio, only happens when process was run from control room after ~3-4 minutes usually.

Likewise, if I remoted into the session, and then run from control room, the error does not occur (successfully ran in a remote desktop window for > 3 hours).



------------------------------
Ben Kirimlidis
RPA Developer and Data Analyst
PTSB
Europe/Dublin
------------------------------
4 REPLIES 4

If you haven't tried it yet, then it may help to take a Screen Capture via the Exception stage to see if something peculiar is happening on the runtime resource.

What type of application are you attaching?

------------------------------
Pratyush Garikapati
ROM Architect
Blue Prism
Asia/Kolkata
------------------------------

Hi Pratyush,

It is a Windows application.

Have tried the screen capture, the BOT is on the correct screen of the system, such that all I need to do to complete the action when I remote into the resource is to click on the application and then press enter or click on a button in the application.

What I have tried so far:

1) Created a test process to isolate the behavior, all this process does is open the application, select an option on a menu to go to another screen, then navigate back to the main menu.  Does this on a loop.  Will work for between 50 to 600 loops of this before it fails to attach.
2) Adding waits before and after every interaction
3) Changing the Windows title and Collection to be more inclusive in case the name of the title was changing
4) Only a single instance of this app can be open at once on a PC so added/removed child index
5) Tried sending keys instead of pressing button
6) Tried identifying entirely different elements of the screen for the attach
7) Other than interacting with an SQL DB via BP utilities, this is a single application automation so tried removing Detach stages.

Tried variations and combination of all of the above, in all cases the process still ends up working for a few hundred loops before failing to attach again.

What is interesting is that if the process fails, then I can never get the process to work again, i must either send a command to restart the machine or remote into the resource and click on the application.

Have been testing this on and off for a week and feel like I've tried everything, i suspect there is something very obvious that I am missing.

If anyone has any insights (even if it's pointing out something very obvious I am missing) I will appreciate it.



------------------------------
Ben Kirimlidis
RPA Developer and Data Analyst
PTSB
Europe/London
------------------------------

Hi Ben,

While others are weighing in, you can raise a Customer Support ticket as well to investigate this.

-Pratyush

------------------------------
Pratyush Garikapati
ROM Architect
Blue Prism
Asia/Kolkata
------------------------------

Given that you figure out what's causing this behaviour, please share it with the rest of us.

Much appreciated!

Kind Regards,

Joakim

------------------------------
Joakim Eklund
Senior RPA Developer
Swedbank AB
Europe/Stockholm
------------------------------