Action – Start a subworkflow

Facebooktwitterpinterestlinkedinmail
Applies to version 8.3.x and above; Author: Kamil Nędza

Intro

When starting a new workflow with an action, there are three available modes to do it. They are found at the bottom of the Basic configuration tab:

  • As a subworkflow of current instance– The created instance will be a subworkflow of the current workflow instance.
  • Parallel to current workflow – The created instance will have the same parent workflow as the current workflow instance.
  • As a parent workflow, unrelated to current instance – The created instance is independent. When it is started it has no subworkflows or any parent workflow instance.

 

Examples of use

The most commonly used modes are: starting as a subworkflow of the current instance and as an unrelated workflow. In the following example we will focus on the rarer scenario, where the newly created workflow instance is started parallel to the current instance.

 

One of the examples can be launching a duplicate of a given workflow instance so that the new instance would have the same parent and certain values would also be the same. Such workflows can be found in:

  • Invoice workflows, when using cyclical invoices, where only the invoice number and issuing date change, and the rest of the data remains the same.
  • Equipment checkout workflow, when multiples of one item are registered in the system.
  • Assigning one task to multiple users (in separate workflow instances) for a project.

 

Configuration

On the transition path, add a Start a subworkflow action. In the action configuration, define which workflow should be started as a result of this action, and with which settings. A sample configuration may look like this:

 

Then go to the Data tab and define which values from the current workflow instance should be copied to the new workflow instance:

3

 

In this case, we choose not to send the invoice number and its issuing date, since they will always be different. All other values repeat themselves in cyclical invoices.

Don’t forget to save the process.

 

Verification

We go to the SharePoint form, and move the workflow instance through the transition path on which the Start a subworkflow action was defined. In this case, I named the path Duplicate.

Take note of the parent workflow instance, found in the lower left corner:

4

 

After traversing the path, a duplicate if the instance is created. Opening the parent workflow instance in the browser will reveal that it now has two subworkflow instances. The first – FK/2016/07/00002 – which served as the original, and then the duplicate – FK/2016/07/00003.

5

3 thoughts to “Action – Start a subworkflow”

  1. Is there a way how to assign a new subworkflow instance to only specific user ?
    I created Workflow with. On the path in the Workflow step there is defined action ‘Create sub-workflow’.
    In the action I set:
    1. Start mode to As a parent workflow, unrelated….
    2. In advanced configuration – fields author and addition task assignment to the specific user ‘Login.Value#Surname.value’.
    I need to assign sub-workflow only to specific user. With these configuration not only him gets assignment but also the user who moved parent (from where was subWF created) workflow instance.

    1. Hello,
      Task assignments are defined in path options, so in the “Basic” tab of the “Start a subworkflow” action, you must select the path which the newly created instance will take – the task will be assigned according to the configuration of this path.
      You can create multiple paths leading out of the start step and/or define various ways of assigning tasks on each of them, depending on what you need.

      1. Thank you very much, it works. It works not only by configure the path task creation assignment but also using by using the action Create task .

Leave a Reply

Your email address will not be published. Required fields are marked *