// A sub-process is a reference transition with an associated page
// First, generate the transition itself
initTransition(iNet.addNewTransition(), (TransitionModel) currentModel, null);
// Create the page and add the sub-net to it
// by calling ourselves recursively
Page newPage = iNet.addNewPage();
// Associate the new page with the ID of the sub-process model
// so it can be assigned back later on when importing the net
newPage.setId(currentModel.getId());
// Create a new XMLBean representing the sub-net
NetType newNet = newPage.addNewNet();
ModelElementContainer subProcessContainer =
((SubProcessModel)currentModel).getSimpleTransContainer();
EditorLayoutInfo subProcessLayout =subProcessContainer.getEditorLayoutInfo();