Sub Process
A sub-process is a special shape that includes a process and hide its logic from the parent process. The process included in the sub-process shape must begin with a start event and end with an end event.
Everything that is supported in the main process is also supported in the sub-process. The sub-process acts like a task in the main process.
An intermediate event can be attached to a sub-process shape.
Data input/output/object are common between a process and all existing sub-processes. If a data value is set in the main process, data value is then available in the sub-process, even if multiple levels of sub-processing is involved in. If a data value is set in a sub-process, the data value is available in the main process. The sub-process shape must not have data association to gain access to data or to set data from the parent process.
In the figures above, the main process set D1 value and the sub-process uses that data to set D2 value.
Event Sub-Process
There are two important differences between a sub-process and an event sub-process. A sub-process event is not included in the main process flow and it is triggered by an event. Consequently, an event sub-process must start with a start event that is not a none start event - must include event definition.
In the figures above, an intermediate escalation event would be triggered depending on the user task inputs' content. When triggered, the intermediate escalation event will trigger the escalation start event starting the event sub-process flow. After the completion of the event sub-process, the alternative flow will continue in the main process. So, the ESP1 T1 task will be triggered, the ESP1 E1 end event is reached, then the ST1 task will be triggered and the process will end when the end event E2 will be reached.
Call Activity
Call activity allows to invoke another process (from the same model or linked model) where the invoked model becomes a child to the main one. All processes are included in the service but only the top-level process is considered entry point to the service.
Interaction with called process instances is done in regular way via resume points.