To add up to what @philippfromme elaborated on:
postExecute('create.subProcess', function() {
modeling.createElement('...');
modeling.createElement('...');
modeling.createElement('...');
modeling.createElement('...');
modeling.createElement('...');
modeling.connect(...);
});