:PUT_ATT

Use the :PUT_ATT script statement to change the value of object attribute during the generation process. Attributes defined for an object affect how the object is processed. This script statement lets you dynamically change those object attributes and assign new values when the task is generated. The new values are only valid for the current generation and are not permanently stored in the object.

When you dynamically change object attributes, be aware of the order in which scripts are processed in the Process pages, and the stages of execution. Changing attributes is only useful before an object is processed, and may lead to undesired outcomes if you do not consider the stages of execution.

Example: a task is configured to be generated at runtime. A :PUT_ATT statement on the Pre-Process page of the task sets the queue (QUEUE attribute). However, the system checks available slots and the status of the queue before it processes the script on the Pre-Process page. The task starts in the queue that you set with the :PUT_ATT statement, but the limit of the new queue is not verified, and the task may start too early.

More Information:

Syntax

:PUT_ATT Attribute = Value

Notes:

Important:

Tip: You can use this script statement on the Process page in order to limit the maximum number of parallel runs (attribute: MAX_PARALLEL_TASKS). In this case, the limit is only checked after the script has been processed when the task is generated at runtime.

Examples

:SET &TYPE# = GET_ATT(EVENT_TYPE)
:PUT_ATT EVENT_CHECK_METHOD2 = "FILE_STABLE"
:PRINT &TYPE#

The GET_ATT script function assigns the value FA to the script variable &TYPE#. After the :PUT_ATT call, the event type is FT because the attribute FILE_STABLE belongs to the file system event. The variable &TYPE# still includes the value FA.

The following example shows how to assign a new Agent to an object:

:PUT_ATT HOST = "UNIX02"

See also:

seealso

MODIFY_UC_OBJECT