Tutorial - Using Variables in a Workflow

Note

You need a working Database Connection for this tutorial.

 

For tasks executing within a Workflow, the order of precedence for resolving user-defined variables differs.

As the following procedure demonstrates, the variable definition in the task takes precedence, then Universal Controller looks within the Workflow or parent Workflow(s), with the global variable coming last.
 

Step 1

Create a SQL task called SQL with Variable with the following SQL command:
 

Step 2

Click the Save button and then re-open the task.

Step 3

Click the Variables tab and create a Variable with the following values:

  • Name = tutorial
  • *Value+ = task

Step 4

Click the Save button and in the task Details, click the Update button.

Step 4

Create a Workflow called Variable Workflow.

Step 5

Add the SQL With Variable task to the Workflow and save it.

Step 6

Launch Variable Workflow. and open the SQL With Variable task instance on the Activity Monitor. Note that the SQL command resembles the following, with the value from the task variable.
 

Step 7

Open the task and delete the task variable.

Step 8

Go back to Variable Workflow and add the following variable:
 

Step 9

Open the task instance. The SQL command used the variable from the workflow because the task no longer had a variable.
 



For additional information, see: