Subprocesses

What is a subprocess

Workflow subprocess (Eng. subprocess) is a separated fragment of a larger business process that performs a specific, repeatable set of actions. It is used to organize and modularly design workflows — allowing complex processes to be divided into smaller, easier-to-manage parts.

Subprocesses make it easier to reuse the same procedures in different places in the system, increase the clarity of BPMN diagrams, and allow independent testing and modification of individual process stages. As a result, the organization gains greater flexibility, consistency, and ease of maintaining its business processes.

Working with subprocesses

Creating a subprocess

We create and save a subprocess in the same way as a process.

Adding a subprocess to a process

While editing the process to which we want to add the previously created subprocess, in the main process we add an element of type Task.

Next we change its type to Call Activity (the context menu Change element will be displayed after selecting the block and clicking the key icon).

Illustration 1. Task type change menu

In the next step for the selected block Call Activity in the right panel we expand the section Called element. First we set the element type (property Type) to BPMN, and after expanding the subsequent fields we enter in the field Called element the process created earlier - placing it as a subprocess in the process being edited.

Illustration 2. Call Activity menu

Subprocesses and dependencies

Because a subprocess is part of another process, when saving the process definition in the version save window we will receive information about dependent artifacts.

Due to such a dependency it is not possible to delete the subprocess definition from the repository.

Deleting the main process is possible and is not confirmed by any dialog. However, a message appears at the bottom of the screen allowing this operation to be undone.

When downloading the artifact of a process that is a main process (option Download in the context menu of that process), the subprocess of that process will also be downloaded.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<exportArtifactWithDependencies>
    <dependencies>
        <dependency>
            <additionalData></additionalData>              
            <content>PD94bXZlbnQ{...}XRpb25zPgo=</content>
            <folderPath>/developers/mwachowska/</folderPath>
            <majorVersion>1</majorVersion>
            <minorVersion>6</minorVersion>
            <name>subprocess.bpmn</name>
            <type>bpmn</type>
        </dependency>
    </dependencies>
    <exportArtifact>
        <additionalData></additionalData>
        <content>PD94bW{...}lvbnM+Cg==</content>
        <folderPath>/developers/mwachowska/</folderPath>
        <majorVersion>1</majorVersion>
        <minorVersion>3</minorVersion>
        <name>main_process.bpmn</name>
        <type>bpmn</type>
    </exportArtifact>
</exportArtifactWithDependencies>

When importing a process with subprocesses into an application, they will also be automatically added to that application

Versioning and use of subprocesses

In the field Binding we can specify the version of the subprocess.

  • By default it is set to latest, meaning always the newest version.

  • However, we can indicate a specific version (version) or bind the subprocess version to the deployment of the main process (deployment).

The same subprocess can be used in many main processes, so its update may affect all related processes. After testing and before production deployment it is recommended to bind to a specific stable version.

Open instances always use the version of the subprocess that existed when the main process was started. New instances, if Binding = latest, will use the new version of the subprocess.

Last updated

Was this helpful?