cancel
Showing results for 
Search instead for 
Did you mean: 

Sub processes vs Objects wrapper

BartoszBuchcic
Level 2
Hello Everyone,
I would like to start discussion about Solution Design Best Practices - Wrappers and Sub-processes topic.

I am wondering which approach would be better to implement for large scale and long term usage.
From what I understood reading Solution Designer Overview document it is always wise to decide whether to use Sub-processes or Objects Wrappers because incorrect usage of Sub-processes may cause memory leaks: "if the child process is being used repeatedly by the parent, it is possible for unwanted memory leaks to build up if memory is being consumed by the child process (and its objects) faster than the Garbage Collector can clean up."

So now if I would like to develop automation for process including sub-processes like:
1. Master Process
 1.1 Sub-Process 1
 1.2 Sub-Process 2
 1.3 Sub-Process 3
Should I choose to put sub-processes logic as Objects Wrappers or BP Processes?

Obvious disadvantage of using Objects Wrappers is that they are loaded while initializing the process so machine needs enough memory to load them all (with all references?).

Disadvantage of Sub-processes instead may lead to memory leaks. Of course I can run Garbage Collector on clean up and wait until it finish but will it not decrease solution performance?

Which way should I go if I face for example master process with 10 sub-processes?

Please share your thoughts.

------------------------------
Bartosz Buchcic
RPA Developer
IBM BTO BCS
Europe/Warsaw
------------------------------
1 REPLY 1

nobu
Staff
Staff
Hi Bartosz,

I can't say which is the best using Sub-Process or Object. It depends on the entire design of your process automation. Anyway, I'll provide my feedback based on my experience. 

First of all, I will take this action
  • if it is "Business Logic", "Rules" or "Decision", it should be "Process".
  • If it is an action to interact with the target application, it should be "Object". It can be generic actions without interacting with the target application.

After that, if it is "Process" and called by the Master process many times during the process, I would add the "Process" into one of the pages of "Master Process". In this way, the "Process" was loaded in memory space until the Master process was completed. You don't need to worry about the risk of memory leaks. 


If it is "Process" and called by the Master process a few times. And also the "Process" has to be re-reused by other Master processes, "Sub-Process" can be a possible option. 
 
In terms of memory combustion by Object, please keep each object with fewer elements and actions based on the page of target applications. It depends on the specification of the client machine but if you develop business objects followed by our Best Practice guide, it should be okay. 
 
In any case, please run a stress test in you DEV/UAT environment before the process goes into the Production site. 

Cheers,

Nobu


------------------------------
Nobuhiro Tokushige
Product Specialist
Blue Prism
Australia/Sydney
------------------------------