powered by ASAP

1. What You Will Learn

In this guide you will learn how to use Sub Workflows in the PAK Editor.

2. Prerequisites

The functionality for Sub Workflows is only available if you have a professional or ultimate licence. Otherwise, the feature is locked.

To complete this guide you will need

  • Roughly 10 minutes

  • The PAK Editor ( Download )

3. Defining the Sub Workflow Repository

By default, no Sub Workflows are stored. In order to use specific Sub Workflows you have to add the corresponding repository that is of type „Workflows“ or „Commands & Workflows“. How to add a Workflow repository is described in chapter BPMN Editor – Manage Available Commands and Workflows via Repositories.

You can also add a Workflow repository during the Sub Workflow adding. How to do so is described in the following.

You can only use Workflows as Sub Workflows if they are uploaded to a remote repository. It is not possible to use local workflows for Sub Workflows.

4. Add Sub Workflows to a Workflow

In order to be able to use Sub Workflows open a new Workflow and select the „Sub Workflow“ element in the palette on the left side of the PAK Editor.

Editor Add Subworkflow Element
Figure 1. Add the Sub Workflow element

After adding the „Sub Workflow“ element, select it like shown in the figure below. Now you can change the name of the element (2) and select the desired workflow (3).

Editor Added Subworkflow
Figure 2. Sub Workflow

In case no Workflow repository was added/selected in advance no workflows will show up. But you can add them by clicking on „Add workflow repositories here“. Further information about repository management can be found in chapter BPMN Editor – Manage Available Commands and Workflows via Repositories.

Editor Open Sub Workflow empty
Figure 3. Open a Sub Workflow – No Workflow repository found

After enabling at least one repository that contains Workflows a list of all existing Workflows will be shown. You can either search for a specific one in the free text field (1) or navigate through the tree (2). In case you cannot find a specific Workflow it might be useful to reload the repository (3).

Editor Open Sub Workflow tree blank
Figure 4. Open a Sub Workflow – Workflows found

After you found your desired Workflow (1), click on it. Another window will open up that shows the available versions for the Workflow. To open a specific version you can either double click it (2) or select it and click on „Choose“ (3).

Editor Open Sub Workflow tree
Figure 5. Adding a new Workflow repository

After selecting the correct version it will be displayed in the „Properties“ window of the Sub Workflow (1 & 2).

Editor Successfully Added Workflow
Figure 6. Successfully added a Sub Workflow

5. Input for/ Output of a Sub Workflow

The Dataflow Analysis is also analysing the Sub Workflow and thus, e.g. missing input fields are displayed in the Dataflow Analysis tab of the PAK Editor(1). Input fields of a Workflow that are usually filled by the Datastore must be given by the main Workflow when used as Sub Workflow. Every key written by a Workflow represents the outputs of a Sub Workflow if used as such.

The usage of output variables can be handled in the Properties window of the Sub Workflow (2). If an output field is checked it can be used in the Commands or Sub Workflows that are logically placed behind.

Editor Sub Workflow In Outputs
Figure 7. Input and Output Variables

Constant and key mappings work analog to usual commands. For more information see the chapters How to Define and Use Basic Mappings and How Use Advanced Mappings (Interpolations).

In case the output is neither checked nor assigned in the key mapping, the output is ignored in the following procedure of the Workflow.

Please note that in case of using a key mapping for output fields (1) this field will be disabled in the „Sub Workflow Outputs“ (2). But even if the output is disabled, the values will still be propagated but with the field name specified in the key mapping.
Editor Mapped Output
Figure 8. Input and Output Variables

6. Open the Sub Workflow within a Workflow

To open the content of a Sub Workflow double click on the element within your main Workflow. The Sub Workflow will be opened in a new tab of the Editor and can be edit there.