cancel
Showing results for 
Search instead for 
Did you mean: 

when process has to be separated as sub process

PrakashKattamur
Level 2
 when process has to be separated as sub process and when can we have that one as sub page instead of sub process. Please help anyone.
5 REPLIES 5

CliveBarnard
Level 3
Basic answer is that you can do either. Main use of the Sub-Process is to keep the Main Process more manageable (not a massive amount of tabs) of if the Sub-Process could be a reusable component and/or called separately to the main process. Working with Sub-Processes also allows multiple people to work on the same Main process.

RobinBerggren
Level 2
Not sure if i implemented my sub-processes in some kind of faulty way (beats me how that would be possible tho), but following up on errors throughout the process gets a bit more tricky when calling - and it's occurring - inside the sub-processes. Apart from that it's a great way to keep the processes clean and manageable.

AndreyKudinov
Level 10
When sub-process exits, it destroys child objects, keep that in mind.

david.l.morris
Level 14
I agree with the previous comments. Also, one small thing but a good idea to know before you design out a process with a bunch of subprocesses. Last I checked (which I guess was a while ago), subprocesses do not have access to any queue items locked by the parent process. You could put the exact same code into an action of an object, and that action does have access to locked queue items by the calling process. General advice I have: Don't use subprocesses at all unless both of these conditions are true: (1) you need to call that subprocess from Control Room by itself not just as a subprocess and (2) you will not be calling the subprocess in the main loop of another process due to possible memory leaks. The point that aikudino brings up is one of the main reasons also that I do not usually use subprocesses. When a subprocess finishes, it runs the Clean Up page of all the objects it uses, which for me has caused unintended consequences.
Dave Morris 3Ci at Southern Company Atlanta, GA

AndreyKudinov
Level 10
Just to clear it up, I use subprocesses mostly like this: main process checks prerequisites, then run process steps one by one, does clean up. Subprocesses are modular independent steps like: upload all files, read back all results, execute requests for each item in the queue, generate and send report. I have 3 scenarios that have different steps/order, so it is easier for me to build it this way, although I could probably just use pages or scheduler for the same purpose, but that would be a mess. Only downside is that you should not pass huge collection data back and forth. Most memory efficient way in that case is just to make one huge VBO, including dragging in standart VBO actions you use.