Skip to content

Sub Process

A Sub Process is a group of elements inside a workflow, with its own start event. Use it to:

  • group steps that belong together, so the diagram is easier to read;
  • repeat steps once for each item in a list, for example send a form to each signer in a list (see Repeat a sub process for each item).

To add one, drag Sub Process from the palette. It’s created open, with a start event inside it. Build the steps inside it, from the start event to an end event, and connect the sub process to the elements before and after it. Click Collapse subprocess to show it as a single box, and Expand subprocess to open it again.

The sub process’s settings are on these tabs:

  • General: the ID and the Name shown on the canvas (default: “SubProcess”).
  • Inputs: the data the sub process receives. See Inputs and data.
  • Multi Instance: shown only for a multi-instance sub process.
  • Outputs: what later elements can use.

The start event inside the sub process gets its inputs automatically from the elements connected before the sub process. The elements inside the sub process use them like any other inputs. Elements inside the sub process can’t pick outputs of elements outside it directly.

When the process reaches a regular end event inside the sub process, the sub process ends and the main process continues after it.

In Output Node, select the element inside the sub process whose outputs the sub process passes on. For example, select the last form, so later elements can use its result. If you don’t select one, the sub process has no outputs.

  1. Make sure the sub process has an input of type List (or Dict or Any) with the items, for example the signers.
  2. Click Change type on the sub process and turn on Parallel multi-instance or Sequential multi-instance at the top of the menu. The Multi Instance tab appears.
  3. On the Multi Instance tab, select the Collection: the input with the items.
  4. Turn on Is sequential (or parallel) to run the items one after another, or leave it off to run them all at the same time. The process continues after all the items are done.

Inside a multi-instance sub process, the start event also gets Current Loop Element (the current item) and Current Loop Index (its position). The sub process’s output is Results Collection: a list with the outputs of the Output Node for each item. Select the Output Node for a multi-instance sub process too.