Recapping Environment Variables
Before we start this course, it is good to refresh our memory on what Environment Variables are. Environment Variables are optional static configuration information which are attached to a specific Environment. These variables are most commonly used to store Process related information such as the passwords and usernames of the systems that are being connected into.
The main advantages of using Environment Variables are that after configuring them they can simply be referred back to, and their values can be updated without having to deploy new versions of Processes.
Best practices for Environment Variables
Environment Variables have multiple use cases and situations in which using them will help you and your organization develop Processes quicker and manage valuable and sensitive data used in different Processes. Environment Variables are designed to store Environment dependable values. These values can be almost anything, but one of the most important use cases for Environment Variables is to use them to store Processes' sensitive authentication information such as connection strings, passwords and usernames.
The best practice for situations in which sensitive information is used is to make sure type "secret" is used when creating the Environment Variable. This will render the values unreadable in the Process itself and the values will not be logged. This will also have an effect on importing and exporting Processes because these secret Environment Variables cannot be exported or imported with the Process.
It also recommended to store variables that are not Environment specific but are subject to change inside Environment Variables. The Environment Variables can be changed or updated without having to deploy a new version of a Process. Environment Variables enable other Processes to use that information as well without having to configure them into Tasks over and over again. This will save time when creating new Processes and when updating values, for example outdated passwords or connection strings.
Grouping is another great practice when using Environment Variables. Grouping is a great way to categorize the Environment Variables and store variables that are used together in Processes or do similar things. For example, connection information: username, password, connection string and other connection information can be stored in one Environment Variable group. As well as this, Environment Variables are easily accessible by Processes because they use a similar naming convention when they are referred to. It will also help when searching for them in the Environment Variables View.
In most cases the grouping naming convention should be done following one of these three levels: System, Process, or a collection of Processes. Following the System level, the groups are named after the System they are used with, for example Azure AD, Salesforce etc. This will help to better distinguish the information that the Environment Variables are holding. Process level naming convention is done by naming the group by the name of the Process where they are used in, for example INT901, INT205. This use case is important when creating large and highly sophisticated Processes which require multiple Environment Variables. A better convention for this is to use the third level and do the naming convention by grouping the Processes into larger groups, for example INT200 series, which indicates that all INT2xx Processes share the Environment Variables in this group.
Lastly, Environment Variable naming convention should be agreed upon within the company and then listed in the integration handbook or otherwise documented. This will help others when creating new Environment Variables or when searching through the values of Environment Variables used in specific Processes.
The next article is Best practices on Logging in Frends