Try and Catch


#1

Hi,
I have built a workflow, and if i want to use try and catch on the whole workflow.
How do i do?
I want to do like this, if there is some errors in the flow i want to restarts to whole workflow from startnode.

Best regard
Mattias


#2

Simply add a Try Catch activity and copy your existing activities into it. Let me know if you need an example.


#3

Hi Richard,
Thanks for your reply.
Yes, please give an example :slight_smile:
For example, I have built a robot that compares two excel files.
However, sometimes there is a problem loading the Excel files.
And if that happens, I want to start the robot from scratch.
And just close the app and restart.

Thank you in advance :slight_smile:

Sincerely
Mattias


#4

Hi Mattias,

Please find example. TestTryCatch.xaml (11.2 KB)

Please change name of your workflow in “Try” part.

Hope This will help.

Thanks,
Kuldip Gohil


#5

Hi Kuldip,

Thank you so much for you help. :slight_smile:

I will try that now :slight_smile:

Best regards
Mattias


#6

Hi again Kuldip,

Unfortunately, I can not make it work :cry:

I put my workflow name in the “Try part” but i dosen´t work.

Should i do anything more?

I start an app and log in then, I compares two excel files and then i mail the result.
But for example if anthing goes wrong somewhere in the workflow, i want to close everything and start all over again from the begining.
Close excel files and other apps running. Just do a fresh start from the begining.

Something like just Try Catch and if someting goes wrong in the flow it shut down everything and start all over again.

Do you have an solution for that ? :pray:

Best regards.

Mattias


#7

If you share your workflow we can take a look :smiley:


#8

You should have some workflwo/activities which will close your all application in case of failure and that you can execute in catch part.


#9

This might help


#10

Hi Kuldip,
Thanks, and if I want my workflow to automatic start over again from scratch. What do you recommend?

regards
Mattias


#11

use “retry scope” activity.
Retries the contained activities as long as the condition is not met or an error is thrown.


#12

Thanks :slight_smile:


#13

Hey,
w.r.t try catch, could you help me on if the expression contains special characters then is to perform a click operation…else the output in the message box…!