Process variables

A process variable is a value that Collibra stores with each workflow instance. You can retrieve and change that value each time the workflow runs.

Setting process variables

You can use the start form to create process variables, including configuration variables. The variable you enter in the Initiator field in the Main config section of the start form is also a process variable. This variable defines the user who starts the workflow.

In your user tasks, each form becomes a process variable. Use the form Id to reference the variables.

In your script tasks, you set a variable with the following line of code where <variable_name> is a String and <variable_value> is an object:

execution.setVariable(<variable_name>, <varaible_value>);

Retrieving process variables

In your script tasks, you retrieve a variable with the following line of code where <variable_name> is a String:

execution.getVariable(<variable_name>);

Outside script tasks, you can retrieve the value of a variable by including the variable name in an expression: ${}, for example ${startUser}.

Tip   Use the form Id to reference variables created by forms.

Exchanging process variables with a sub-process

Sub-processes are workflows that run as part of a parent workflow. They are not meant to be stand-alone workflows. You must provide values at least for the start form variables that have the Required property set to true. You may also want to use the values of some of the sub-process variables in the parent workflow. To exchange information between the parent workflow and the sub-process, configure the call activity in the parent workflow:

Note   Since the parent workflow and the sub-process are separate workflows, you can use the same name for corresponding variables.