RG042 – RES AM Global variables explained

By Rob Aarts

 

It’s always nice to see how a personal feature request finds its way to final release ;-). As most of us know, it is possible to use parameters in Automation Manager tasks. In this way we can make the job generic. When creating a Run Book or a project, it’s possible to link the same parameter to multiple tasks in multiple modules.

However, when you start working in multitenant environments such as OTAP, you would like to re-use the the same tasks over and over again, but with values specific to a given environment. This was somewhat possible previously, but the new “Global Variables” feature makes life easier from now on!

How it Works:

The values of Global Variables can be set up at Infrastructure > Datastore > Settings > Global Variables. These values are inherited by default by all Teams and Agents, but exceptions for individual Teams and Agents can be set up on the Team's Team Variables tab and the Agent's Agent Variables tab. Team Variables and Agent Variables allow "owners" of a specific Team or Agent to override the Global Variables by specifying a custom-value. This makes Variables especially useful for use in multitenant RES Automation Manager sites, because it makes it easier to manage different settings for different customers and assigned projects, and to exchange Modules, Projects and Run Books with other branches of an organization.

Example:

You could set up Global Variables to specify a Domain, Security Context and Domain Controller for usage in a task aimed at managing a computer in Active Directory. This would result in a generic Task that can be used by all console operators in your multitenant site. "Owners" of a specific Team or Agent at the customer site can then override the global values of these variables by specifying a custom-value that only applies to their site. When the Task is executed, the Task automatically gets the correct value that applies to the individual customer site. Depending on the hierarchy of these variables, these can be the global values, team-specific values or Agent-specific values.

Configuration rules:

Below are some things which you need to know when working with Global Variables in Automation Manager. Consider these the rules of engagement.

  • Variables can be divided in categories. The category General is a default category and cannot be edited or removed.
  • The name of a Variable or category must be unique in your RES Automation Manager site.
  • When setting up Variables, you can use the following types:
    • Credentials: this is a combination of domain\user name and password. Use this in a user name field for which there is also a password field, for example in the Security Context of a Task. The matching password field will be disabled, as this type of Variable will fill both. The password is always masked.
    • Password: this is a password only. Use this in password fields that are not part of a set of credentials, for example for the password for a new local user. The value of this type of Variable is always masked. Its input must be entered twice for confirmation.
    • Text: this is a text string of a single line. Use this in any field that needs to contain text, for example file name, Organizational Unit name, etc.
  • The Global Variables apply to all Teams and Agents, but can be overridden by Team Variables or Agent Variables.
    • Agents can use Agent-specific values, inherit these values from their primary Team, or inherit them from the Global Variables.
    • Teams can use Team-specific values, or inherit them from the Global Variables. Nested Teams do not inherit their settings from the Team in which they are nested.
  • Variables can only be added and deleted at Infrastructure > Datastore > Settings > Global Variables; not from the Team Variables tab of a Team or from the Agent Variables tab of an Agent.
  • When a Variable is deleted, its value will no longer be resolved in the Tasks in which it is used, but becomes an actual value. For example, if you have used a Variable ^[CustomerName] in a field in a Task, and delete this Variable without changing its value in this Task, the actual value of the field becomes “^[CustomerName]".
  • To create and insert a Variable in a field of a Task automatically, right-click the relevant field in the Task, click Insert Variables and select the Variable. Variables are divided by category in the context menu.

Notes:

As stated in the online help in AM2012, when creating a Building Block of Modules containing one or more Tasks in which Variables are used, these will be included in the Building Block. When importing such a Building Block, the following applies:

  • If a Variable in the Building Block already exists in the environment in which the Building Block is imported (based on name, irrespective of type), a new Global Variable will not be created, because the names of Variables must be unique.
  • If a Variable in the Building Block does not exist in the environment in which the Building Block is imported (based on name), a new Global Variable of the same type will be created with the same value as in the originating environment. Team Variables and Agent Variables will inherit this value from the Global Variable.
  • If these Variables are categorized in a category that also exists in the receiving environment, the new Variables will be categorized in this category. If the category does not exist in the receiving environment, the Variables will be categorized in the category General.
  • When exporting Job results, all Agent Variables are included in the XML files, which can for example be used for Asset Management. (CMBD, Content Management Database).

Custom Properties from previous versions of RES Automation Manager are automatically migrated to Variables in RES Automation Manager 2012. Because names of categories in Variables must be unique, any categories in Custom Properties with the same name will be merged into one category in Variables and any existing Custom Properties objects in these categories will be categorized in this category. It is not possible to base the value of a Variable on another Variable by inserting a Variable in another Variable.

 

1 Comment

  • By Patrick Kaak, January 30, 2012 @ 06:32

    It’s probably good to know that Global Variables are only available in RES Automation Manager 2012 and up

Other Links to this Post

RSS feed for comments on this post. TrackBack URI

Leave a comment

Comments are welcome as always. Just do the math below. * Time limit is exhausted. Please reload the CAPTCHA.