Put environment value into a context variable

How can I put the environment value into a context var? We would like to use this variable in gateways and be able to set specific related variables?

Solution:

This is possible using the custom plugin. In this plugin you can read the environment property "Home.Environment.DisplayName" using the System.getProperty( ) method and then set this in context using context.put().

Below is an example custom plugin that can get the environment property "Home.Environment.DisplayName" using the System.getProperty( ) method from the server-configure.properties: