The primary question is "When, and for what purposes, do you use the default 'Initialise' and 'Clean Up' pages of an Object?
In our organization, we often use default time values for Wait and Sleep stages (1, 5, 15, 30, 60). For some of our Objects, these values are loaded into global variables/data elements in the Initialise stage. But, in all honesty, there is no real benefit to this method, as compared to loading them as needed in the Action pages. However, this falls firmly into the 'No Harm, No Foul' category.
This weekend, though, I was toying/experimenting with what I thought might be an actual use case. I have bult a simple Wrapper Object that kills defined active Windows processes, as it finds them. These are currently held in a static Collection within the WO. These can range from nusiance processes to those that tend to get orphaned by BP Process terminations. We are starting to use this WO as a standard action at the start, the end of the 'Happy Path' and the end of the main exception handling. This helps clear the way for the process, and tries to keep the process from leaving detritus behind that could derail subsequent Processes. This has been working well, but every so often we identify a new application to add to the list.
This got me thinking that it would be nice to move the list of applications to a reference text file that could be loaded into the Collection. This would allow for quicker updates, and for an easier Path-to-Prod (due to less intensive Change Management requirements). Additionally, I thought it would be more efficient to load the reference file once, as a part of the initial load into memory, rather than each and every time the WO action was called. This last part proved to be true-ish. But I still ran into an issue where terminations could/would occur if too many processes tried to access the reference file at the same time. I could build in retry logic, but, again, this WO will generally be used only twice by a process, so there is not a whole lot of 'juice for the squeeze', as it were.
So, that was my entertainment for the weekend. It just left me wondering if others are able to get significant benefit out of these default pages.
Thanks much,
Red
------------------------------
Robert "Red" Stephens
Application Developer, RPA
Sutter Health
Sacramento, CA USA
------------------------------
Robert "Red" Stephens
Application Developer, RPA
Sutter Health
Sacramento, CA