Guideline for using values
Various values are used in objects. They serve to specify the hostComputer, target system. on which jobs run, the files which should be processed, the type of reaction to events etc. An advantage of AE's objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task orientation is that these values can be dynamically set and processing can be controlled by the particular situation.
AE provides several ways of storing values and assigning them to other objects.
Values that are relevant for many tasks are stored in static Variable objects. A clientA closed environment within an Automation Engine system where you can create and run objects. A client name consists of a 4-digit number that must be indicated when a user logs on to the Automation Engine system. Users and their rights are also defined in clients. A particular Automation Engine object type.'s objects can access their contents and modify them using scriptA particular Automation Engine object type. elements.
The following illustration shows a static Variable object. It already contains the variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. "HOST" with value "unix01".
Example:
The responsible administrator is entered in the Variable object using the script statement :PUT_VAR. The host name is changed to "unix02".
:PUT_VAR "DB_MAINTENANCE", "ADMIN", "Smith"
:PUT_VAR "DB_MAINTENANCE", "HOST", "unix02"
A taskAn executable object that is running. Tasks are also referred to as activities. reads the host name using the script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… GET_VAR:.
:SET &HOST# = GET_VAR("DB_MAINTENANCE", "HOST")
The script statement :DELETE_VAR deletes the host specification from the Variable object:
:DELETE_VAR "DB_MAINTENANCE", "HOST"
Values that are only relevant for individual tasks are stored directly in the object. Almost all executable objects contain a Values tab which can be used to enter variables that should be used in the Process tabs. These values can be used directly as script variables.
The following screenshot shows the object variable "&HOST#".
This variable can be immediately used in the script. The following example uses the object variable to terminate the agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host.
:TERMINATE ,&HOST#
There is a peculiarity which applies to object variables. They can be inherited from the superordinate object. For example, tasks of a Schedule can use the object variablesPlaceholder for values that are stored in an object's "Variables & Prompts" tab/section. of its Schedule. This simplifies maintenance because it is no longer necessary to store the values in all individual objects.
Values relevant for a task that is started using ACTIVATE_UC_OBJECT can be stored in an input buffer. This is done using the script statement :PUT_READ_BUFFER . The task reads the stored values with the script statement :READ.
Example:
A jobAn Automation Engine object type for a process that runs on a target system. puts the name of its agent to the input buffer and then calls a notificationAn Automation Engine object type used to send messages to users and user groups. [Formerly called "CallOperator."]:
:SET &att_host# = GET_ATT(HOST)
:PUT_READ_BUFFER host# = '&att_host#'
:SET &ret# = ACTIVATE_UC_OBJECT('CALLOP')
Notifications can read agent names:
:READ &host#,,
:PRINT "Agent: &host#"
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |