question: public void addChild ( NodeCollection childCollection , CommonNodeMaintainer nodeMaintainer ) { if ( children . isEmpty ( ) ) { children . add ( childCollection ) ; haltStepNode . setToNode ( childCollection . getInitStepNode ( ) ) ; } else { children . add ( childCollection ) ; if ( forkNode == null ) { forkNode = ForkNode . getForkNode ( id , children , nodeMaintainer ) ; for ( NodeCollection child : children ) { forkNode . addToNode ( child . getInitStepNode ( ) ) ; } } else { forkNode . addToNode ( childCollection . getInitStepNode ( ) ) ; } haltStepNode . setToNode ( forkNode ) ; } }
target:  Populating childCollection When a process has only one child process, the child is added to childCollection and haltStepNode of the current process is directed to BeginNode of the childNode. In case of multiple children, all the child processes are traversed one by one and are added to childCollection. Multiple child processes are handled using something called the Fork Control Node.