Skip to main content
Version: 2023 R2

Start a subworkflow (SQL)

This action allows you to start workflow instances within the same BPS instance and differs from the Start a subworkflow action with its Data tab. It is also not possible for this action to save and store the IDs of started workflow instances in form fields. Data required to start the workflow should be provided using the SQL query – this allows you to start many new workflow instances.

Its configuration window is divided into three views that vary depending on the requirements and the advancement level of the user. These views are available in three dedicated tabs: Basic, Advanced, and Data.

Start a subworkflow (SQL) Basic

Basic configuration

Basic configuration of the action Start a subworkflow (SQL) used to start multiple workflows is analogous to the basic configuration of the action Start a subworkflow.

Advanced configuration

Advanced configuration of the action Start a subworkflow (SQL) used to start multiple workflows is analogous to the basic configuration of the action Start a subworkflow, but it does not provide the ability to copy the subworkflow ID to an indicated form field.

Start a Subworkflow (SQL) Advanced

Data

This tab is used to define Data source and SQL query properties.

Start a Subworkflow (SQL) Data

1. Query returning data

The query should return columns whose names will be the same as form field names. Additionally, you can return columns such as:

  • COM_ID – company identifier,
  • WF_ID – workflow identifier,
  • DTYPE_ID – form type or subform type identifier,
  • PATH_ID – path identifier,
  • PRINT_LABEL – specifies whether a barcode label should be printed,
  • CHECK_PERM – specifies whether the current user’s privileges to add new workflow instances should be checked,
  • OVERRIDDEN_AUTHOR – the overridden author of a workflow instance.

Returning one of the above columns will cause overriding of a given parameter in the started workflow.

Example
select ‘a’ as WFD_AttText1

2. Data source

The data source from which or in the context of which values are retrieved.

3. Filter query

The query is executed for every row returned from the data source of the started workflow. The workflow will be started if the query returns "1" or "True" in the first column of the first row.

Example

It is also possible to include the data row values in the query. To do this, use the tag ##col1## where "col1" is the name of the data row column.

Sample query:

 if('##col1##'=’a’) select 1

4. Data source

The data source of the Filter query from which or in the context of which values are retrieved.

5. Variables editor

Dynamically generated tree containing all variables that may be used in the current location of Designer Studio. Information on how to use variables in WEBCON BPS, as well as a list of variables can be found here.

info

For more information about subworkflows see Starting workflows in WEBCON BPS – actions.