Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can embed Universal Controller variables in the script content. Embedded variables are resolved at trigger/run time before the script is sent to an Agent.

...

Note
titleNote

You also can enter a script directly into a Universal Template, but you cannot select a stored script.

...

There are five types of scripts:

Script

For use in Windows or Linux/Unix tasks.

SAP Definition

For use in SAP tasks.

UDM Script

For use in UDM File Transfer tasks.

Web Service Payload

For use in Web Service tasks.

Data

For use in a script or task (see Data Scripts, below).

...

...

To use a Data Script with a task, embed the Data Script in any of the following:


Note
titleNote

Although you can embed a Data Script in the Command field or Parameters field of a Linux/Unix or Windows task, only scripts with Script Type = Script can be referenced in a Linux/Unix or Windows task; that is, it is the only type of script that is available for selection in the Linux/Unix or Windows task Script field.

...

To embed a Data Script, use the following Script Function:

Name

Description

Syntax

Return Path to Data Script

Used for embedding the path to a Data Script.

${_scriptPath('<script_name>')}

...

For every Data Script embedded in a Data Script, the Controller will resolve ${_scriptPath('script_name')} (if Resolve UAC Variables is enabled for the Data Script), and look for additional Data Script references (and Resolvable Credentials references). This process will continue until no additional Data Script references are found.

...

UAG will replace any tokens within the Script Content, Universal Template Script, Command, or Parameters with the appropriate file path associated with the Data Script Content. UAG also will replace any tokens within each Data Script Content.

Additionally, for a Universal Template, you can create a Field of Type = Script, which lets you select or create Data Scripts. The Controller will create a variable for the Data Script Field, which you can embed in the Universal Template script using the Script Functions. This also lets you change Scripts when you run a Universal Task based on the Universal Template.

...

For every embedded Data Script, the Execution User must have Execute permission for the Data Script; otherwise, the task instance will transition to the Start Failure status with one of the following status descriptions:

...

Creating a Script

Step 1

From the Automation Center navigation pane, select Other > Scripts. The Scripts list displays a list of all existing scripts.
 
To the right of the list, Script Details for a new script displays.
 

Step 2

Enter / select Details for a new script, using the field descriptions below as a guide.

  • Required fields display an asterisk ( * ) after the field name.
  • Default values for fields, if available, display automatically.

To display more of the Details fields on the screen, you can either:

  • Use the scroll bar.
  • Temporarily hide the list above the Details.
  • Click the  button above the list to display a pop-up version of the Details.

Step 3

Click a  button. The script is added to the Controller database, and all buttons and tabs in the Script Details are enabled.


Note
titleNote

To open an existing record on the list, either:

  • Click a record in the list to display its record Details below the list. (To clear record Details below the list, click the New button that displays above and below the Details.)
  • Clicking the Details icon next to a record name in the list, or right-click a record in the list and then click Open in the Action menu that displays, to display a pop-up version of the record Details.
  • Right-click a record in the a list, or open a record and right-click in the record Details, and then click Open In Tab in the Action menu that displays, to display the record Details under a new tab on the record list page (see Record Details as Tabs).

Anchor
Script Details
Script Details

...

For information on how to access additional details - such as Metadata and complete database Details - for Scripts (or any type of record), see Records.

Anchor
Script Details Field Descriptions
Script Details Field Descriptions

...

Field Name

Description

Details

This section contains detailed information about the Script.

Name

Include Page
IL:Script Name
IL:Script Name

Version

Include Page
IL:Versions
IL:Versions

Description

Include Page
IL:Summary
IL:Summary

Member of Business Services

Include Page
IL:Member of Business Services
IL:Member of Business Services

Anchor
Script Type
Script Type
Script Type

Type of script:
 
Options:

  • Script
  • SAP Definition
  • UDM Script
  • Web Service Payload
  • Data

Anchor
Resolve UAC Variables
Resolve UAC Variables
Resolve UAC Variables

Controls whether or not the Script will be parsed in pursuit of Universal Controller variables. It allows the Controller to avoid the overhead of parsing a Script that does not contain variables.
 

Note
titleNote

Variables could be embedded with this field disabled; likewise, you could have a Script with no variables but have this field enabled. However, enabling this field for a Script that does not contain Controller variables will impose an unnecessary burden (however small) on the Controller.


Anchor
Content
Content
Content

Include Page
IL:Content
IL:Content

For UDM Scripts, Source and Destination credentials are available for use. The credentials can be coded into the UDM script using the following File Transfer variables:

The variables will be resolved by UDM internally. The following example illustrates the correct way to code them:
 

Panel


Html bobswift
<pre> open src=srcserver user=$(ops_src_cred_user) pwd=$(ops_src_cred_pwd) dst=dstserver user=$(ops_dst_cred_user) pwd=$(ops_dst_cred_pwd)
</pre>



 
The values for these variables are sent to UDM via stdin. This provides a secure channel where the credentials never show up in the script or on the command line.

Metadata

This section contains Metadata information about this record.

UUID

Universally Unique Identifier of this record.

Updated By

Name of the user that last updated this record.

Updated

Date and time that this record was last updated.

Created By

Name of the user that created this record.

Created

Date and time that this record was created.

Buttons

This section identifies the buttons displayed above and below the Script Details that let you perform various actions.

Save

Saves a new script record in the Controller database.

Save & New

Saves a new record in the Controller database and redisplays empty Details so that you can create another new record.

Save & View

Saves a new record in the Controller database and continues to display that record.

New

Displays empty (except for default values) Details for creating a new record.

Update

Include Page
IL:Update button
IL:Update button

Anchor
Upload Script
Upload Script
Upload Script

Allows you to upload a script from the local file system and place it in the Content field (see Uploading a Script, below).

Copy

Creates a copy of this script, which you are prompted to rename.

Delete

Include Page
IL:Delete button
IL:Delete button

Refresh

Refreshes any dynamic data displayed in the Details.

Close

For pop-up view only; closes the pop-up view of this task.

Tabs

This section identifies the tabs across the top of the Script Details that provide access to additional information about the script.

Tasks

Lists of all tasks using this script.

Notes

Include Page
IL:Notes tab
IL:Notes tab

Versions

Include Page
IL:Versions tab
IL:Versions tab

...

Step 1

Click the Upload Script button. The Script File Uploader pop-up displays.
 

Step 2

Click the Choose File button and select a script from the local file system.

Step 3

From the Select file encoding drop-down list, select the character set of the script:

  • CESU-8
  • IBM00858
  • IBM437
  • IBM775
  • IBM850
  • IBM852
  • IBM855
  • IBM857
  • IBM862
  • IBM866
  • ISO-8859-1
  • ISO-8859-2
  • ISO-8859-4
  • ISO-8859-5
  • ISO-8859-7
  • ISO-8859-9
  • ISO-8859-13
  • ISO-8859-15
  • KOI8-R
  • KOI8-U
  • US-ASCII
  • UTF-8
  • UTF-16
  • UTF-16BE
  • UTF-16LE
  • UTF-32
  • UTF-32BE
  • UTF-32LE
  • x-UTF-32BE-BOM
  • x-UTF-32LE-BOM
  • windows-1250
  • windows-1251
  • windows-1252
  • windows-1253
  • windows-1254
  • windows-1257
  • x-IBM737
  • x-IBM874IBM875
  • x-UTF-16LE-BOM

Step 4

Click the Submit button to add the script to the Content field.

...