Designer Studio

A deeper look into WEBCON BPS Substitutions

Understand exactly how substitutions work in WEBCON BPS. More advanced uses of substitutions in WEBCON BPS.

This is already described!

On the subject of substitutions, there are already two articles on the WEBCON BPS technical blog. The first of them talk about how the substitution mechanism works, the second updates this knowledge with new substitution functionalities present in the WEBCON BPS 2019 version. This basic knowledge is sufficient to start using substitution functionality in your applications.

However, if you are interested in what kind entries are made in the database and how you can use this knowledge in creating advanced business processes – I am inviting you to continue reading.

Tasks and Substitutions

Substitutions only work on tasks to be performed by a given user. In other words, if someone has read privileges to some workflow instances, but there is no task on it for him, then his substituting person will not receive read rights.

When adding tasks in WEBCON BPS, we always decide whether a given task can be done by another person with substitutions. Thanks to this, during the process configuration, we are able to indicate critical tasks that will never be performed by substituting people. The default configuration allows for substitutions.

Example of task creation configuration with substitution enabled

Tasks in database

I have registered 2 tasks for the user “Test User” in the system. All tasks (both active and completed) are in the WFElementTasks table. Below is a query that allows you to list all active tasks for the user “Test User”:

Active tasks of the “Test User”

As you can see our “Test User” has two active tasks in the system. He has a task with ID 35 for workflow instance with ID (WFD_ID) 522. This task can not be ended by a substituting person. The second task with ID 36 allows substitutions.

Substitutions in database

How to add and how to configure substitution activation time, you may find at WEBCON BPS technical blog(Substitutions & Substitution in WEBCON BPS 2019).

I added three substitutions and deleted one of them. The database result is shown below:

All substitutions in WEBCON Database

The first substitution was deleted. Cov_IsDeleted column was checked to 1 and COV_IsActive set to 0. The rest substitutions are active. Column COV_DEFID is responsible for storing information about the process ID of the indicated substitution. In case the substitution applies to all WEBCON processes, the column contains a NULL value.

You have to remember, that substitutions in WEBCOn BPS do not work instantly. After adding, changing or removing substitutions, there is a need to calculate tasks. This operation is performed by WEBCON BPS Service at the appointed time.

Configures substitutions activation time

Let’s check how looks our table with tasks, after substitution activation time:

All substitutions in WEBCON Database after the substitution activation time

As you can see, there was added one more task to the WFElementTasks table. For a task with ID 36 which was allowing substitutions, was created another one for covering user (“webcon user”). The column WFT_OrgID is storing the ID of the original task. On the web form of this workflow instance this looks like below:

Workflow instance with substitution

Upgrade SWE: Calculated column with substitutions

Unfortunately, there is no standard column in the WEBCON SWE Report witch will display who is substituting the assigned person. But with the query shown below you may do it on your own using calculated columns. This query will display every substituting user separated with semicolons.

SWE report with “Substitutions” column

Global Business Rule: Is user A covering B?

Sometimes in the WEBCON BPS process, there is a need to make the form dependent on the current user. For example, we want to show the transition path only to the author of the document. But what if the author of the document goes on vacation and the task is replaced by a substitute? The process will be suspended! Substituting user will not see this transition path. Below is an idea for a universal business rule that you can use to create comprehensive processes that support the functionality of substitutions.

You may create one global business rule like below and use it everywhere when your process depends on the current user context.

Globa Business Rule configuration

Below is an example of this business rule usage. Let’s assume we have already path visible for the author of the workflow instance. Now we want to show this path also for substituting coworker. This business rule may look like below. The path will be visible when the current user login is equal to the login of the author or the author is covered by the current user.

Example of global rule usage

Featured image: Words Sticker Vectors by Vecteezy

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…

3 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…

3 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…

3 years ago

JSON nested collection handling in WEBCON BPS

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

3 years ago

REST Web Service Connections – WEBCON BPS Authentication

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

3 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…

3 years ago