cancel
Showing results for 
Search instead for 
Did you mean: 

Exceptions in VBO's

EfrainCintron
Level 2
Hello Everyone, 

This might be BP 101, but I want to be sure. We have a process that on occasion exceptions out in the VBO when trying to click something on a page. Is it a best practice to have these email notifications coming out of the VBO after its final retry? Currently, we have a catch all in the process that is not capturing this. 

Thanks in advance for your thoughts.

------------------------------
Efrain A. Cintron
Sr. Business Analyst
Kforce
------------------------------
1 REPLY 1

dmma
Level 5
Hi, 
From experience it is good practice to handle all exceptions inside the process, and not in the objects (VBOs).
1) It makes solutions easier to maintain, as you would be sure that you are handling errors and recover from them inside process.
2) Objects should be reusable and should not have any business logic inside otherwise it will be messy.
3) Each object page should be responsible only for single action - Single Responsibility Principle (Pattern) 

And few words about your situation: sending emails from inside the object. You can have one object like: Email Client or Email Utility with several pages, get inbox, send mail and others.

And you can use and reuse these actions in many other processes. 
So if any process breaks, while trying to click some element, catch this error in the process and use another object to send the notification.
Because object which is clicking, should not support mail sending 🙂 and vice versa.

Hope that will help a little bit on implementing better solutions!

------------------------------
Dmitrij Mamajev
RPA Developer
Volvo Cars
Gothenburg - Sweden
------------------------------
Kind regards, [FirstName] [LastName] [Designation] [JobTitle] [CompanyName] [City] [State] [Phone]