Skip to main content
Version: 2027 R1

Start workflow (SQL)

Like the Start workflow action, this action starts a new workflow within the same WEBCON instance. Unlike it, the data needed to start the workflow is not entered directly in the action — it is taken from a row (or multiple rows) returned by an indicated data source, which allows a single action start many new workflow instances at once.

Basic configuration​

The Basic tab of the Properties panel contains settings shared by every action in an automation: the Active toggle, the Action type field, the Documentation field, the Use action template toggle (when enabled, the action takes its configuration from the selected action template defined in the process), the Execution condition section (decides whether the action always runs or only when a custom rule is met), and the Runtime error handling section (the message and numeric error code returned when the action fails to execute). Since these settings are not unique to the Start workflow (SQL) action, they are described in detail in the Actions chapter.

The Basic tab in the Properties panel of the Start workflow (SQL) action

Advanced configuration​

The Advanced tab contains all the fields specific to the Start workflow (SQL) action, grouped into five sections: Run parameters, Data, Conditional starting of instances, Tasks and privileges, and Workflow instance data. Compared to the Start workflow action, this action does not offer the option to copy the started workflow's ID to a form field — since a single call can start many instances, there is no single identifier that could be saved this way.

The Advanced tab in the Properties panel of the Start workflow (SQL) action

1. Run parameters​

Determine which workflow the new instances are created in and how they are linked to the current workflow.

  • Process — the process in which the new workflows will be started.
  • Workflow — the workflow of the selected process in which the new instances will be created.
  • Form type — a toggle: Indicated / Set dynamically. With Indicated, the form type is chosen from a drop-down list. With Set dynamically, a Form type ID field appears, letting you set the form type's identifier with a variable.
  • Path — a drop-down list with the options Indicated, Default path, and Set dynamically. With Indicated, the path along which the new instances are created is chosen from a drop-down list. With Set dynamically, a Path ID field appears, letting you set the path's identifier with a variable.
  • Business entity — a toggle: Indicated / Set dynamically. With Indicated, the business entity is chosen from a drop-down list. With Set dynamically, a Business entity ID field appears, letting you set the business entity's identifier with a variable.
  • Workflows start mode — determines how the new workflows are linked to the current one:
OptionDescription
As a subworkflows of current instancethe new workflows are created as sub-workflows of the current instance
Parallel to current workflowif the current workflow is itself a sub-workflow of another workflow, the new workflows are created as sub-workflows of that same parent workflow; otherwise they are created as parent workflows, unrelated to the current instance
As workflows unrelated to current instancethe new workflows are created independently of the current instance, with no parent/child relationship
tip

The Form type, Path, and Business entity fields can each be set dynamically by inserting a single variable in the corresponding field — an SQL query cannot be used here. This is a different mechanism than the data source indicated in the Data section below, which is used to pass form field values for the started instances, not run parameters.

2. Data​

This section allows you to indicate a data source from which form field values for the started workflow instances are taken.

  • Value source for initiated instances — a data source (chosen from the Connections or Data sources branch) whose every returned row starts one new workflow instance. The column names returned by the query should correspond to the names of the form fields to be filled in. Unlike the Start workflow action, there is no separate Form field values table here — every form field's value comes exclusively from this data source.

Besides columns matching form field names, the data source query can also return special columns that overwrite the corresponding parameters of the started workflow:

ColumnDescription
COM_IDbusiness entity identifier
WF_IDworkflow identifier
DTYPE_IDform type identifier
PATH_IDpath identifier
PRINT_LABELbarcode label printout
CHECK_PERMchecks whether the current user has privileges to add new instances
OVERRIDEN_AUTHORoverwrites the instance author

3. Conditional starting of instances​

Allows you to define an additional condition that decides whether a new workflow instance is actually started for a given data row.

  • The toggle is off by default — in that case, a new instance is started for every row returned by the data source in the Data section.
  • When enabled, the Data source field appears — another data source, checked separately for each data row of the instances being started. If it returns "1" or "True" in the first column of the first row, that instance is started; otherwise it is skipped.
Example

The conditioning data source's query can reference the value of the current data row of the started instances using the ##column_name## tag, e.g.:

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

4. Tasks and privileges​

  • Additional task for — allows you to indicate additional people who will be assigned a task on every newly created instance, regardless of the standard assignment resulting from the starting step's configuration.
  • Additional CC task for — similar to the field above, allows you to indicate additional people who will receive the task for information (CC), without having to complete it.
  • Check logged-in user privileges to add new workflow instance — when checked, the privileges of the logged-in user in whose context the action runs are checked before new instances are added. If the user lacks the required privileges, the action fails.

5. Workflow instance data​

  • Comment — allows you to set the text of a comment added on every newly created instance.
  • Overwrite instance author — by default, the author of a new instance is the currently logged-in user, which means they will have read access to the instance throughout its entire lifecycle. When this option is enabled, the field that appears lets you indicate a different user, who will gain read access to the new instances as their author.
  • Copy attachments to workflow — when checked, all attachments from the parent workflow are copied to every newly created workflow.
  • Set form field data before defaults evaluation (compatibility mode) — unchecked by default; controls the order in which form field values are set on the instances of the started workflows. When checked, the values passed by the action are set on the form fields before their default value rules run — as a result, default value rules do not run for form fields that already have a value set, while rules for the remaining form fields still run and take into account references to the already-set form fields. When unchecked, the values passed by the action are set only after the default value rules run, overwriting the calculated values.
info

More information about this action can be found in the article Starting workflows in WEBCON – actions.