Please refer to the subgraph example.
This process contains five different activities where three activities is in a multi-instance sub-process.
- Create new document - spawn a new document sub-process
- Document multi-instance sub-process
- Check-in document
- Check-out document
- Download document
- Close Case
When we simulator we initially have only two activities in the task list.

You cannot check-in or download any documents as no documents has been created yet.
If you create one new document the task list changes:

You must now check-in the newly created document. You must still close the case but you cannot do this as the first document is not yet checked in.
Once you check-in the first document you have four tasks:

If you check-out the first document you will block Close case as the document is checked out. If you also add a new document the task list will look as follows:

You must now check-in both documents, the first as you checked it out, the second as it has not yet been checked-in.
You must also check-in both documents before you can close the case. Once the case is closed thereare two tasks left in the task list:

When the case is closed it is not possible to check-out and edit the documents anymore.
