cancel
Showing results for 
Search instead for 
Did you mean: 

object calling

RakeshMudunuri
Level 3
Hi,

is calling one object from another object (not process) best practice ?

Thanks
Rakesh

------------------------------
Rakesh Mudunuri
RPA Developer
------------------------------
Thanks Rakesh RPA Developer
6 REPLIES 6

LucaValente
Staff
Staff
Hi Rakesh,

objects should only include actions that perform minimal operations on the application UI. Business logic, business rules and decision making should not be included in the object's action. If you follow those rules, and in general the rules listed in the Object Design Guide (https://portal.blueprism.com/documents/object-design-guide), you should be in the position of avoiding to call object's actions from another object. There might be exceptions but objects that calls other object's actions are difficult to maintain, generally not reusable, and require strict regression tests every time one of their dependencies change. Even a mature Design Authority would struggle maintaining that level of control. Long story short, it is strongly advised that all object's actions are called from BP Processes and not from other objects.



------------------------------
Luca Valente
Senior Product Consultant
Blue Prism
America/New_York
------------------------------

wleung
Staff
Staff
Hello Rakesh,

I completely agree with Luca's advice.

I would only add that from my experience, there have been some instances where I've created objects that called other objects. This usually happens with utility objects that are not driving target applications. For example, when I want to create a wrapper object that performs a very specific, discrete unit of work but need to rely on another utility object (Strings, File Management, Collection, etc.) for some capability support. There may also be some edge cases here to support extending an existing object's functionality without completing forking a utility object into a custom, in house supported object.

I would recommend tracking object dependencies as part of your delivery process to avoid those potential release dependency issues.

------------------------------
Wing Ling Leung
Senior Product Consultant
Blue Prism Professional Services
------------------------------

Hi Luca,

Thanks for your time !

if i want to create some object with the help of Utility-strings (no need to interact with other applications), in that case also your answer is valid ?

Thanks
Rakesh

------------------------------
Rakesh Mudunuri RPA Developer
RPA Developer
Asia/Kolkata
------------------------------
Thanks Rakesh RPA Developer

Hi Wing Ling Leung,

Thanks for your reply !

so, if we are going to create some object with available utility objects (not calling target related applications) there is no problem with that approach ?

Thanks
Rakesh


------------------------------
Rakesh Mudunuri RPA Developer
RPA Developer
Asia/Kolkata
------------------------------
Thanks Rakesh RPA Developer

Hello Rakesh,

I would avoid calling objects within objects for all the reasons that Luca pointed out and as a general practice. However, there are definitely cases where I don't see this as a problem. For example, if there is a common String VBO and your organization is building a common Document Parser object(with common functions such as counting number of words in a paragraph, etc.) I don't see any reason why the Document Parser object cannot leverage the common actions in the String object.

Hope that clarifies.

------------------------------
Wing Ling Leung
Senior Product Consultant
Blue Prism Professional Services
------------------------------

Hi
same thing in my mind too.
Thanks for clarifying.

------------------------------
Thanks
Rakesh
RPA Developer
------------------------------
Thanks Rakesh RPA Developer