When to use the Throw or Rethrow activities in UiPath

  Рет қаралды 8,579

UiPath Hacks by Gabi Verzea

UiPath Hacks by Gabi Verzea

Күн бұрын

This video clarifies the usage of the Throw and Rethrow activities in UiPath, highlights the differences between them, and provides a simple use-case demo for using either of the two activities.
While these activities are probably not used everyday, it comes in handy to know how to use them in your exception handling logic, and they are crucial if you want to design your exception handling in a good, multi-level structure.
00:01 Topic and summary of the video
00:18 UiPath Hacks intro theme
00:42 Exception handling overview
01:25 System Demo of using Throw vs. Rethrow. There are two cascaded Try-Catch blocks.
03:18 The Throw Activity throws a new exception, eg. a business one. A new catch block should be defined for this new exception type.
04:50 The Rethrow Activity throws the SAME exception (don't even have a chance to define a new exception in the properties panel)
06:14 Wrap-up and conclusion
Let us keep in touch:
/ gabrielverzea

Пікірлер: 14
@emiliadaian648
@emiliadaian648 2 жыл бұрын
Hello Gabi. Thank you for explanation. It is very useful in understanding how throw and rethrow works. As a quick suggestion would be nice if you can upload the xaml (maybe on uipath forum) so we can replicate your example.
@UiPathHacks
@UiPathHacks 2 жыл бұрын
Hi Emilia. great suggestion. I posted the XAML file in the UiPath Forum and linked it in the comments of this video, as well: forum.uipath.com/t/how-to-use-throw-and-rethrow/11772/38
@kenchang3456
@kenchang3456 4 жыл бұрын
Excellent work. Thank you for sharing.
@UiPathHacks
@UiPathHacks 4 жыл бұрын
Thank you, Ken !
@kenchang3456
@kenchang3456 3 жыл бұрын
Thanks for another excellent video. Do you have a video or could I request a video to show how to reschedule a job on orchestrator in case of a business or system exception? For example, I have a job that starts at a set time which updates a Excel workbook. If the workbook is open by someone else and I try to do a read range on it I would like to email the person(s) that have the workbook open asking them to exit the workbook and then reschedule the job to start 30 mins later and then abandon trying to run the job after say 3 tries. It doesn't seem like Orchestrator has that as a built-in capability.
@UiPathHacks
@UiPathHacks 3 жыл бұрын
Hi Ken. This is a great idea. I did not try this out so far, but I will have a look and let you know if I find an easy solution. I would imagine it could be solved with some API calls, but I have to try some things out. Another idea would be to add a queue item when you catch the exception, and increment there the number of fails. And create a Queue trigger that will start as soon as there is an item on that queue. But I am not sure how to introduce the 30min delay in an elegant way, other than send this number with the queue item and include a delay activity for whatever value defined on the queue. This is not ideal, as the bot would then be in use for all this time and not allow another process to run in parallel. I will think about it some more.
@kenchang3456
@kenchang3456 3 жыл бұрын
@@UiPathHacks thanks for considering the thought. I thought about updating an asset and having the bot scheduled every 30 mins and if current time was greater than asset time let the bot run. Again, not very elegant.
@Ramimanimation
@Ramimanimation 3 жыл бұрын
You are very good in this thing
@UiPathHacks
@UiPathHacks 3 жыл бұрын
thank you !
@gidionmanojkumar8279
@gidionmanojkumar8279 3 жыл бұрын
Enlightened 💥
@UiPathHacks
@UiPathHacks 3 жыл бұрын
Glad to be of service :)
@UiPathHacks
@UiPathHacks 3 жыл бұрын
The link to the XAML file I uploaded in the UiPath Forum: forum.uipath.com/t/how-to-use-throw-and-rethrow/11772/38
@jonekopir5558
@jonekopir5558 3 жыл бұрын
Excellent
@UiPathHacks
@UiPathHacks 3 жыл бұрын
Thank you so much 😀
The UiPath RE-Framework - Full Tutorial for Beginners | UiPath Training Online
38:32
UiPath Hacks by Gabi Verzea
Рет қаралды 1,4 М.
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 113 МЛН
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 11 МЛН
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 15 МЛН
Throw and Rethrow in UiPath | Error Handling in UiPath
26:14
Automate with Rakesh
Рет қаралды 47 М.
UiPath Try Catch - Full Tutorial From Start to Finish
23:32
Anders Jensen
Рет қаралды 19 М.
How and why to use Process Arguments in UiPath Orchestrator
5:26
UiPath Hacks by Gabi Verzea
Рет қаралды 2,4 М.
UiPath SLA | Understanding Service Level Agreements or SLA in UiPath
23:10
Automate with Rakesh
Рет қаралды 2 М.
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 113 МЛН