Environment Variables are optional static configuration information that is attached to a specific Environment. These Variables are most commonly used to store Process-related information such as passwords and usernames of systems that are being connected to.
Creating an Environment Variable
There are six kinds of environment variables:
Group: A Group Variable is used when grouping multiple keys under one root variable.
List: A list of text Variables.
Text
Number
Boolean
Secret: A secret Variable will hide its value from the UI.
In this how-to, we will be creating a Group Environment Variable with multiple sub-Variables:
To create a new Group Variable, click on the "Create new" button on the left side of the View and add a descriptive name for the key.
βTo add four new sub-Variables for this Group Variable, select the Group Variable from the list and click "Create new" button.
Text - Address
Text - Username
Secret - Password
Number - Port
Set values for the Variables in both development and testing Environments.
β
These Environment Variables are now ready to be used in a Process.
Using Environment Variables
Environment Variables can be used in Process parameter input Editors. In this example, we will use the FTP variables created above in a SFTP ListDirectory Task.
To be able to use a Variable directly in a parameter input, the mode of the input needs to be "Expression". After that, you can reference them by typing "#env.FTP", and then autocomplete will suggest the appropriate key to choose. It is also possible to reference an Environment Variable in a non-expression parameter input. In this case, the format needs to be the following: "{{#env.FTP.Username}}".
The Task will now use the values set in the Environment Variables when run in an Environment.
Editing Environment Variables
When an Environment Variable is edited, the next execution of any Process using that Variable will use the new value instead of the old one.
Before editing an Environment Variable, it can be a good idea to verify where the Variable is in use to not make any unwanted changes. To view where the variable is being used:
Search the Variable you want to edit.
Move your mouse over the Variable you want to edit.
Click on the "Show processes using variable" link that appears.
You cannot delete an Environment Variable that is being used by a Process.
Next, learn how to Deploy Processes.