You can add a sub-workflow to a task if you are assigned to the task or you are the owner of the process. Sub-workflow as the name implies can be a series of steps or tasks that must be completed before the original task is completed. It also helps grouping or branching tasks and designing a simpler process. It helps to hide complexity and gain better control of the whole process.
Let us take a look at the process now.

To add a sub-workflow to “Test the process” task, click on it.

From the menu, click “Create Sub Workflow”. You will see the “Create Sub Workflow” dialog. You can choose your workflow type and title just as you would for a regular workflow.

Now, you are in the sub-workflow design page.
Let us add two parallel steps to this sub-workflow.
Click on the task to go back to the Task
You can go back to the main workflow by clicking on its name. You will see that “Test the process” task has a sub-workflow symbol attached to it. You can mouse over the sub-workflow circular icon to see a popup with a link. Click on the link to go to the sub-workflow.

When the process moves to the step, “Test the process”, the step with sub-workflow, the sub-workflow must be completed before it can move to the next step, “Review Test the process”.