The sub-process is a type of activity in the process you model. You can model the following types of sub-processes in the process composer:
A referenced sub-process is an activity in the parent process that represents another independent process. When the process flow reaches the referenced sub-process, the other independent process is called. The parent process and the referenced sub-process communicate through input and output data mappings.
An embedded sub-process is a compound activity that is defined as a flow of other activities. The embedded sub-process is dependent on the parent process and cannot be executed standalone like the referenced sub-process. The embedded sub-process has a local process context, which is not visible for the parent process.