Easier management of Global Variables
Create portable workflows & email templates
Many companies use three or more environments for their enterprise systems, such as Development, QA/UAT, and Production. And each environment has connections to databases, LDAPs, application APIs, web services, etc. that often differ from one another.
Each environment usually has a different base URL and other environment-specific configuration. To make these values easier to update, the PMG Platform has always offered Environment Content – workflow variables that apply globally within a given environment.
Today, Environment Values serve the same purpose but come with an updated management interface and the ability to store the values with encryption, making them both more useful and more secure. The new Environment Values Management feature makes it even easier to create workflows that are portable and that will work in every environment without any modification needed.
Environment Values (a/k/a Global Variables) let you define variables that are available across all workflows within a given environment. Let’s look at an example of how this works in practice.
We’re going to create an Environment Value called baseURL. This value is going to be used whenever we need to provide a hyperlink back to this PMG environment. Below, we’ve defined our baseURL as https://newsletter.pmg.net.
We can refer to this Environment Value in outgoing emails with token G{{baseURL}}. The special markup G{{…}} indicates that the word inside the curly braces should be replaced with the corresponding Environment Value.
The beauty is that if our URL changes, we just update it in the Environment Values Management interface. The update will immediately apply to all workflows (and email templates) in the environment.
How does this help if you have multiple environments (e.g., Dev, QA, and Production)? You can remove environment-specific configuration parameters from your workflows, so that your workflows can be easily ported from one environment to another. For instance, we could update the Dev environment’s baseURL Environment Value to https://dev.newsletter.pmg.net, and the workflows that generate hyperlinks wouldn’t need to be updated.
By moving environment-specific configuration out of workflows and email templates and into Environment Values, we make our workflows and email templates easily portable from one environment to another.
Some common uses for Environment Values include:
- No-reply email addresses
- Hyperlinks
- Environment specific HTML formatting, e.g., CSS for emails
- Paths to shared folders
- Names of error-handling queues or email addresses
In recent versions of the Platform, some new capabilities have been introduced as part of the Environment Values Management feature:
- Values can be stored with encryption, so that even if the database is accessed directly, the values can’t be read
- Environment Value history keeps track of changes – who made them and when
- Restrict which workflows can have access to use the Update Environment Value action, allowing you to restrict which users have permission
- Ability to add Environment Values to packages in Package Manager so as not to forget them as part of a migration
All these enhancements make it even more compelling to take care of your (the) environment!