:ATTACH_RES
Use the :ATTACH_RES script statement with a Storage object to define the resources you want to attach and transfer to the UNIX or Windows agent. You can use this script statement on the Process page of Windows or UNIX Job objects (JOBS).
Notes:
- In a Job that uses :ATTACH_RES, the agent creates a list of all files that should be transferred. If the transfer of the listed files fails, the agent cancels the job.
- The agent transfers information about the operating system, hardware, and platform to the Automation Engine system. However, the Automation Engine system only transfers those resources from the Storage object that comply with its specified values. For details, see Storage (STORE)
- You can transfer resources into a pre-determined directory using ATTACH_RES and copy the files afterward with an external script. Use the &$AGENT_RESOURCES_CLIENT# and the &$AGENT_RESOURCES_CLIENT# system variables for this purpose.
Syntax
:ATTACH_RESObjectName, ResourceName, [Usage], [Variable]
Parameters
-
:ATTACH_RES
Determines the resources that should be attached to the Storage object for transfer to a Windows or UNIX agent for operating systems -
ObjectName
Name of the Storage object -
ResourceName
Name of the resource that should be attached and transferred to the agent
Important!-
The size of resources is limited to 95 MB (99900000 bytes).
Administrator users can reduce the size by setting the storage size with theMAXIMUM_STORE_RESOURCE_SIZE
key in theUC_SYSTEM_SETTINGS
system variable to a lower value. For more information, see UC_SYSTEM_SETTINGS - Systemwide Settings. -
If resources are attached to the Storage object, the Automation Engine system determines the corresponding paths. These paths are not visible to the user. By using the following system variables you can view the details and absolute paths of the resource displayed in the report of the Job object:
&$AGENT_RESOURCES_CLIENT#
Client-wide cache directory&$AGENT_RESOURCES_TASK#
Task-specific cache directory
For details, see the last example of this topic or refer to the List of System Properties
-
The size of resources is limited to 95 MB (99900000 bytes).
-
Usage
(Optional) Determines whether a task-specific or a client-wide cache is used.
Allowed values:-
T (default)
Task-specific value, a task-specific cache is used to transfer the resource files. The task resources are available while the job is running and are only visible for the job. These resources are deleted when the job ends. -
C
Client-wide value, a client-wide cache is used to transfer the resource files. The resources remain in the cache and are only refreshed when the Automation Engine obtains a new timestamp, for example.
-
T (default)
-
Variable
(Optional) An Automation Engine variable is replaced by a text-type storage resource just before it is transferred to the agent.
Allowed values:- N[o] (default)
- Y[es]
- Ensure that the storage resource is text type and that the value defined in Usage is T (task-specific cache). An error message displays if you transfer text-type resources, with the variable replacement set to Yes, to C (client-wide cache).
- For performance reasons, system variables in a text-type resource are only replaced with their corresponding values if the same system variable is used on the Process page.
Important!
Examples
The following example transfers all the resource files that the specified Storage object contains:
:ATTACH_RES "STORAGE12", "*"
This example transfers all resources whose names start with the term "file":
:ATTACH_RES "STORAGE12", "file*"
The third example transfers all resources into a client-wide cache:
:ATTACH_RES "STORAGE12", "*", C
This example replaces a variable in all files that should be transferred:
:ATTACH_RES "STORAGE12", "*.ini", ,Y
The last example uses the &$AGENT_RESOURCES_CLIENT#
system variable for :ATTACH_RES to attach a .jar-file that starts with Java:
See also: