Parallel activity to handle unexpected error

Hi everyone,

I’m trying to get rid of an error pop-up that shows up unexpectedly in a web page. I want have a sort of a ‘listener’ so that if that pop-up shows up, it clicks in a button to remove it and continues the normal process it was doing before the pop-up showed up.

To do this I though of using a parallel activity, with the normal process on one side (let’s call it ‘left side’) and the error treatment on the other (let’s call it ‘right side’). Nonetheless, this doesn’t seem to work since the robot will just run one activity on the left side and one activity on the right side. So, if I have an ‘Element Exists’ activity catching the pop-up message initially on the error treatment (the right side), and if it turns to true (the pop-up exists), the parallel instead of continuing to the error treatment (the button click), will just return to the left side…

Does anyone have any ideia how to solve this?
Thanks!

1 Like

Does the pop-up happen at the same spot in the workflow? If so, just use the ‘Element Exists’ and If activity at that point in the workflow to click the pop-up box if it exists. No need for parallel in this case.

If it pops up randomly that’s another matter entirely. I’ve never tried it, but you could use a While loop that checks for ‘Element Exists’ every few seconds. The While condition would be ElementExists = true OrElse left side is completed. The ‘left side completed’ would just be a simple assign activity that assigns some boolean = true

2 Likes

Hi Dave,

Thanks for your reply.

There are actually several different pop-ups that can show up, but they can show up randomly accross the process. I can never actually figure out exactly where or when they will show up, that’s why I need some sort of ‘listener’ to check inbetween each activity if a pop-up is there or not… And after the error treatment, I want it to continue where it left off, not restart the entire process.

I don’t think the While loop would work because I need to check if the pop-up is there inbetween every activity, otherwise it will fail the following actions.

Any more sugestions are welcome.

1 Like

The While loop on the right side of a parallel activity would mean it is constantly checking until the pop-up is found or the activity completes on the left side of the parallel activity

True, but then it will not continue to the error treatment. After it checks the ‘Element Exists’ on the right side, it will return to the left side and try to continue the process without closing the pop-up

I think there is still some misunderstanding. I attached a workflow explaining what I mean: leopffm.xaml (8.6 KB)

Thanks for that! However if you run the workflow I attach here, I think you’ll understand what I mean. Please open notepad.exe and run the .xaml in debug mode with "step into"s to check how UiPath is processing it. It always alternates and does not continue to the error treatment. leopffm.xaml (14.3 KB)

@leopffm yes, the parallel alternates left then right, that’s how it is intended to work. I am not quite sure what you mean by “does not continue to error treatment”, but have you tried implementing in your actual solution to test it out?

If the parallel alternates from left to right then I cannot see the use of it… it’s just like an horizontal sequence lol. Answering your question, yes I have, and it does not work as I intended. The error treatment I was talking about was closing the pop-up action.

@leopffm

you have two Option

  1. Parallel Activity
  2. Global exception handler

Its Strange … After error treatment only it wil go right side …

Can you share you workflow otherwise we will check and let you know

@leopffm

You can follow the below :

  1. You can give as many click activity as many unexpected popup encountered.
  2. In click activity pass value as “True” for property “Continue on Error”
  3. Give the Timeout (TS) for each click activity (as less as possible ~1000ms)

Try and let me know.

Thank you all!

I’ve used a Global Handler to solve this!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.