Runtime Variables¶
Runtime variables are essentially flow variables that can be imported into a flow from an external file and whose lifecycle is limited to the duration of the computation, as they are not persisted to the database.
The Runtime Variables task helps users import these variables from an external file, particularly useful if they have many flow variables whose values change frequently.
Warning
The flow must have a task with a 2-column dataset containing the names and values of the attributes. The user can import this task using a Microsoft Excel file, but it can be difficult if the file contains “@” symbols to refer to other flow variables, so it is preferable to use a CSV file.
The task must have a high priority in the flow, to ensure it is executed before other tasks, in order to apply the correct values to flow variables.
Only one Runtime Variables task can be included in each flow.
The Options tab¶
The Runtime Variables task is made of only one tab, the Options tab.
Within this tab, users can set and configure the following options:
Attribute for names: users can select the column that contains the flow variable names from the drop-down list.
Attribute for values: users can select the column that contains the flow variable values from the drop-down list.
Overwrite the current value if the variable is already defined: if selected, any values defined in the flow for flow variables with the same name, will be overwritten by the values defined here.
Activate Rulex4 module names back compatibility: if selected, Rulex4 modules names back compatibility will be activated.
Note
Once set, Runtime variables have priority over flow variables at runtime. Consequently, when a workflow is executed, variable values will be taken from:
the corresponding runtime variable, if present
the corresponding flow variable, if present.
Runtime variables have priority over all the other variables.
Example¶
Import from an Import from Text file a two-columns dataset and save and compute the task. Drag and drop a Runtime variables task onto the stage and connect it to the Import from Text file task.
Double-click the Runtime Variables task. Define the attribute by selecting the column containing the names (variables) and the column containing the values (values) from the above-mentioned options. Save and compute the task.