Sub-processes are also known as embedded sub-processes and can be expanded or collapsed. Elements for the sub-process can only be dragged into an expanded sub-process. Use the spanner icon against a sub-process to toggle between a collapsed and expanded state.
A sub-process requires a start and an end event. Only a standard start event can be used in embedded sub-processes. The sequence flow within a sub-process cannot cross its boundary without the sub-process completing. The advantage of a sub-process is that it creates its own scope within a process. This allows for boundary events to be attached to the sub-process.
When a sub-process is executed as part of a process instance, it does not receive a new processInstanceId. The elements within the sub-process will be executed under the ID of the parent process. Process variables are also shared between a sub-process and its parent with no additional mapping required.