Automation Engine Script Guide > Ordered by Function > Read or Modify Objects > GET_ATT

GET_ATT

Script Function: This functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… returns the values of a taskAn executable object that is running. Tasks are also referred to as activities.'s attributes during the generation process.

Syntax

GET_ATT(Attribute)

Syntax

Description/Format

Attribute

Name of the attribute whose value should be retrieved.
Format: AE name, script literal or script variable.


Return codes

Value of the specified attribute.

Comments

The scriptA particular Automation Engine object type. function GET_ATT can be used to retrieve an objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task's attributes value during the generation process. You can only specify attributes that belong to the object.

A list of the attributes of all objects including the allowed values is available in the User Guide.

You can also use a blank " " as an attribute's value. It is used if no value has been specified (for example, if the text field for the archive key is empty).

If the task runs in an AgentGroup, GET_ATT(HOST) returns the name of 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 on which the task is actually processed and not the AgentGroup name.

If you use a script or object variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type.'s name as attribute (see: Reading and modifying attributes), the result of reading this attribute by using GET_ATT() is the content of the specified variable (instead of the variable's name). Use the script element GET_ATT_PLAIN if the variables should not be resolved.

Examples

In the example shown below, the archive key of an object is retrieved and stored in a script variableA placeholder for a value within a script..

:SET &START# = GET_ATT(ARCHIVE_KEY1)

Script variables can also be used in this function.

:SET &ATT# = "JOBREPORT_FILE"  
:
SET &START# = GET_ATT(&ATT#)

This example uses the script function to define a condition.

:IF GET_ATT(GROUP) = " " 
!...
 
:
ENDIF

The following example uses a script variable in an object's attribute field. The variable "&DST#" is specified as the target file in a FileTransfer object. The subsequent script sets the attribute, assigns a value to the variable and reads the attribute. The returned value is the value of the variable "C:\Temp\test2.txt" (instead of the variable name "&DST#").  

:PUT_ATT FT_DST_FILE = "&DST#"
:SET &DST# = "C:\Temp\test2.txt"
:SET &DEST# = GET_ATT(FT_DST_FILE)
 
:PRINT "Target file: &DEST#"
 

 

See also:

Script element Description

:ADD_ATT

Adds recipients to a notificationAn Automation Engine object type used to send messages to users and user groups. [Formerly called "CallOperator."] at runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start)..
:REMOVE_ATT

Removes recipients from a notification at runtime.

:PUT_ATT Changes an attribute's value during the generation process.
:PUT_ATT_APPEND Extends the notification's message text at runtime.
GET_ATT_PLAIN Supplies the value of a task's attributes during its generation. Variables are not resolved.
GET_ATT_SUBSTR Supplies part of a notification's message text.

Script Elements - Read or Modify Objects

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH