> For the complete documentation index, see [llms.txt](https://docs.work-relay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.work-relay.com/processes/building-a-process/adding-subprocesses.md).

# Adding subprocesses

There are two ways a subprocess can be added

### "Start Sub Process" action

* Drag and drop **Start Sub Process** from Actions section

<figure><img src="/files/Ydg47xYunDpOFCTvhhKj" alt=""><figcaption></figcaption></figure>

* On the "Create New Step Action" popup screen, choose a Process

<figure><img src="/files/pEoK3O3EeSs8n1vR9LwZ" alt=""><figcaption></figcaption></figure>

* Provide other Subprocess settings:\
  \
  **Version -** user can select specific process version.\
  **Lock Parent -** the parent step will not proceed until this sub-flow is complete.\
  **Restart Process -** the system will restart the sub process if it was started before.\
  **Inherit variables -** user can use variables set in parent flow inside the sub flow.

<figure><img src="/files/bsMSNQry6PHe2o5R28RT" alt=""><figcaption></figcaption></figure>

* Provide at least one **condition** to search the records to begin the workflow.

<figure><img src="/files/krGWrqedMmhthlDng5On" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If user configures Subprocess on the same Data Source object, the following condition will be added automatically:

**Name** = name of the field that determines unique record, usually it is "ID" or "Record ID"\
**Operator** = "equals"\
**Value** = merge field calling the field that determines unique record
{% endhint %}

**Save** action.

### Create a sub-process from within a process

* Lasso several steps and turn them into a sub-process via context menu:

<figure><img src="/files/Wmp7aXwzMeETInqD6Lop" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note that only steps that are connected together can be transformed to sub-process. If steps have no direct connections, they will not allow to create a sub-process:
{% endhint %}

<figure><img src="/files/aGkmeh15t5dPiKmbkMWZ" alt=""><figcaption></figcaption></figure>
