Applies to version: 2017.1.x and above; author: Krzysztof Gaszczyk
WEBCON BPS is a great tool to create and use constant values. There are two types of constants: Global and Process. This article presents configuration and practical use of both of them.
Global constant – this constant is visible across the whole system. It is frequently used when the value is present in many processes and its change happens in all these places into the same values. It allows to adjust the value returned by the type of the used environment (DEV/TEST/PROD) and its configuration happens in “System settings” tab.
After creating new constant, provide its value. If only “Shared” value will be present, system will use it in each environment. If user will check “Break inheritance” box, system will use there a value which is assigned to it. It allows to assign different values to various environments.
Global constants can be used anywhere that you can use variables to reference data collected on the form.
One of the main usages of this kind of variables is in a situation where each environment is placed under a different address. In this case add a variable with website name which will change depending on the environment. Below is an example of this configuration:
Another common use of global constants is a situation where on two different environments two separate databases are used.
Global constant can also have a JavaScript function declared, which can be used in the form’s behavior. Below you can see configuration of this kind of variable:
Then in form behavior choose:
This allows a single JS function to be chosen both for different processes as well as for different environments.
Process constant – constant which is visible only within a specified process. It can be used if the same values are used in many workflows of the same process but it is not required for this data to be seen across the whole system.
In order to configure this kind of variable go to the process configuration and add a constant and then provide values in specific environments:
One of the most common examples which is usually very popular in financial processes are quotas on which system work is based. Usually these are quotas which condition sending the task to a specific step.
Another example is when – depending on the environment – system assigns task to a specific acceptor. Look at the example below.
In this case where the aforementioned constant is provided in a technical field managed by the acceptor, the system – depending on the environment – will assign the task to an appropriate person.
Summary
Global and process constants are commonly used when having many environments according to the rule stipulated in the following article: Implementation handbook - Application configuration compatible with DEV/TEST/PROD.
It allows to effectively use frequently occurring data on many environments.