Applies to version: 2020.1.x and above; author: Tomasz Słuszniak
WEBCON BPS allows you to start workflows in several ways. In addition to a manual start by the user, instances can also be launched by the system using dedicated actions.
The “Start a subworkflow” action
The action allows you to start a workflow within the same application. By using them you can start only one workflow instance – in this case it will be creating an additional task in the Design process.
The action configuration consists of three tabs:
In the configuration you must fill in:
- Form type
- Business entity
- The method of relating the new workflow with the current one. The workflow can be started as a subworkflow of the current workflow, a parallel workflow, or an unrelated workflow not connected to any other.
In this tab, there is the ability to configure additional direct tasks or CC tasks resulting from the configuration of the transition path configured in the “Basic” tab.
You can also:
- overwrite the author for the instance launched by the action
- copy subworkflow ID to a field
- copy attachments to the subworkflow
- check the current user’s privileges to add new workflow instances
This tab allows you to indicate the form fields which will be initialized when starting the workflow. The form field list will only show those fields that result from the workflow configuration and form type indicated in the first tab.
Or business rules:
The “Start a subworkflow (SQL)” action
This action allows you to start a workflow instance(s) within the same BPS application and differs from the previous with its “Data” tab, and in that it is not possible to save and store the IDs of started workflow instances in form fields.
Data needed to start the workflow should be provided by using the SQL query – this allows to start many new instances of the workflow.
The following example shows how to start several subworkflows for several people based on the item list by using this action.
The “Project name” and “Project description” form fields are provided without mapping because they are the same columns. While, the columns on the Tasks list item list – “Person assigned” and “Task description” are mapped to the corresponding form fields.
The form of the new project registration:
Information about started subworkflows will be visible in the bottom right corner of the form.
A separate workflow instance was started for each row on the Tasks list – each person will receive their own task that they must complete.