SQL

Wait for sub-workflows step – advanced configuration

Advanced configuration of the wait for sub-workflows step using SQL query. Advanced subworkflows settings.

The wait for sub-workflows steps allows for easy and quick configuration of processes in which we deal with dependent sub-workflows. Thanks to this, we can quickly determine how the main workflow should behave depending on the behavior of sub-workflows. However, in many cases, the basic configuration is insufficient and an advanced configuration is required. Here’s how it works.

How advanced configuration works

In the advanced configuration, create an SQL query that will return the identifier of the transition path on which the main workflow is to use, based on the given conditions.

Completed SQL query will be run automatically every time when:

  • Main workflow will enter the wait for sub-workflows step
  • Any dependent sub-workflow enter final step (positive or negative)
Wait for sub-workflows step – advanced configuration

Usage scenario

Two workflows have been configured. One main flow in which we define acceptors and the weight of their votes. After the decision makers are indicated, the workflow goes to the wait for sub-workflows step to determine if at least 50% yes votes have been collected. If at least 50% of the votes are yes, the main workflow is to go to the “Positive” step. In case that more than 50% of the votes are voted for, the main flow is to go to the step called “Negative”.

Main workflow diagram
Dependent sub-workflow

Advanced configuration – SQL query

Below is the SQL query prepared by me.

Advanced setting of wait for sub-elements step
  • The query returns the path to the “Positive” step if the sum of the weight of the yes votes is greater than or equal to 50%.
  • If the sum of the weights of the “no” votes exceed 50%, the workflow will go to the “Negative” step.
  • In all other cases, the query does not return any path, so the main workflow remains at the wait for sub-workflows step.

How it works

Presentation of the functionality in action
nedza.kamil

A graduate of the AGH University of Science and Technology in Krakow. When not involved in the creation and optimization of business processes, he plays board or computer games. He also is interested in using game mechanics (gamification) in real life and business. Spends the evenings creating and prototyping amateur games based on the UNITY engine.

Recent Posts

Managing local WEBCON BPS groups

WEBCON BPS local groups management using simple process. Adding and removal of multiple group users…

5 years ago

Using the FOR EACH ROW form rule in practice

The article describes how to use the FOR EACH ROW form rule in practice on…

5 years ago

Create your own WEBCON BPS Express laboratory from scratch.

A video tutorial on how to set up a WEBON BPS home laboratory from scratch…

5 years ago

JSON nested collection handling in WEBCON BPS

How to use the OPENJSON tabular function to handle a data import to WEBCON BPS…

5 years ago

REST Web Service Connections – WEBCON BPS Authentication

How to configure and use REST Web Service connections using WEBCON BPS Authentication. Examples of…

5 years ago

Upgrade WEBCON BPS Express from 2020 to 2021

How to upgrade standalone version of WEBCON BPS 2020 to 2021. The article describes the…

5 years ago