Hi all,
Can we Execute UiPath Process by using application program interface?
Thanks.
Hi all,
Can we Execute UiPath Process by using application program interface?
Thanks.
Only if you have your Robots connected to Orchestrator.
https://orchestrator.uipath.com/v2018.1/reference
https://platform.uipath.com/swagger/ui/index#/
Hi @danesh,
Check out the post right above here:
The Exception you use in the Throw depends on what you are looking to throw. In his example, he is using a FileNotFound exception, but you can use others. And, if needed, you can also place a Rethrow in the Catch and it will throw the exception that had occurred. (to be honest, I use Rethrows temporarily more for troubleshooting than actually a part of my code; it’s a good way to pause and figure out what errors are happening, although you can also use a Message Box with the below information and is just as good)
exception.Source+"__"+exception.Message
The functionality of Throw is clarified. Could anyone please elaborate a scenario differentiating where Rethrow can be used and how it differs from Throw. The statement “activities are occurred before exception” is a bit confusing. what is it exactly meant by. Can anyone share the knowledge explaining through examples how throw and rethrow are differentiated??
Hi,
I´m not the most technical person and I might say something wrong, so please correct whoever knows, but from what I´ve seen…
Let´s say you´ve got a try/catch activity where the try throws an exception. If you put a Rethrow activity in the Catch block and run the robot from UiPath Studio, then you will get the pop-up window with the exception message and details, and the robot will stop.
On the other hand, if you run that same process from Orchestrator, I think that the robot will give you the error details, but it will continue running.
Please, correct me if I am wrong.
Welcome back!
No, the idea of throwing an exception is to either stop the process or handle that particular exception. If you re-throw an exception, it will stop the process no matter if it was run from Studio during development or from Orchestrator.
I have implemented an example for the same and what i have observed is…
This is correct. If you have an exception and you catch it, it will not stop your process. However, When you rethrow in the Catch block, then it will need to be caught in a Try-Catch above or else it will throw an exception an stop the process.
Thanks.
new Exception(“Throwing an exception because something went wrong”)
Hello Guys!
I tried using the throw and rethrow but I’m always getting the throw message in the catch even if there’s no error in the code. Would you be able to help on how to use rethrow and throw properly? I’m using throw and rethrow because I want to customize the error message that I’m having. Thanks
Cheers
What I did was
Try catch
throw (new exception (“msg”)
Steps
Catch
System.exception (exception.message"
@bdavidov - In simple terms Rethrow is used when you want activities to occur before the exception is thrown. Throw activity is used when you want to throw error before the execution of the step
Hello @sandipauti
How are you? Would you be able to help me to share your knowledge on how to use throw and rethrow or use customize exception? if you have a simple sample, please share. thanks
@Callos_James_AU - I am good thanks , To create your own custom exception like new Exception(“Some message”) just use throw exception activity and pass exception message like Throw(new Exception(“Some message”))
Hey guys,
Hope this might help you
Regards,
Sharath Raju
Can throw be used inside a catch ? The GetAppCredentials of old RE framework has throw inside catch but it is not getting trigerred. What is the solution for it?
Hi All,
Here is the workflow which will show the correct use of Throw activity within try catch
Practise Solutions for Forum.zip (97.2 KB)
Main.xaml (26.0 KB)
Before running the workflow just do the following 2steps :-
Hope this workflow may help you to solve the query
Mark as solution if this helps you and like it
Happy Automation
Best Regards
Er Pratik Wavhal