Defining BACKEND VARA Objects

User-defined VARA objects are powerful dynamic execution tools. They are placeholders for values that they retrieve from different sources, depending on the type of VARA object. You assign VARAs to executable objects. When those executable objects are processed, the VARAs are replaced by their values. As a developer and object designer you create and use VARA objects in the attributes and scripts of executable objects. As an administrator user, you create VARA objects in Client 0 that can be used by other users in other Clients.

You use BACKEND VARA objects to execute commands on Operating Systems (Windows or UNIX) and provide the result as values that are shown in columns. You can store the commands for different Operating Systems, system names, and versions in one BACKEND VARA object. When the VARA object is resolved, the correct command of the Agent in question is automatically selected and executed.

You need the Create and modify Backend variables privilege to create and modify BACKEND VARA objects. For more information, see Granting Automation Engine Privileges.

Notes:

Like any other objects BACKEND VARAs have various definition pages. General, Version Management and Documentation are common to all objects. Here we describe the Variables and Commands pages that are specific to BACKEND VARAs.

To Define a BACKEND VARA Object

  1. On the Variables page do the following:

    1. In the Variable Settings section, specify how the VARA object is going to access the target system from which it retrieves the values:

      • Select the Agent where the command is executed.

      • Select Apply Task Agent to use the Agent of the task that uses the VARA object instead. If the task does not have an Agent (this is the case of Script objects, for example), the Agent of the VARA object is used. If neither the VARA object nor the task has an Agent, an error occurs.

      • Select the Login object that allows the VARA object to access the target operation system.

      • Select Apply Task Login to use the Login object assigned to the task that uses the VARA object. If the task does not have a Login object assigned (this is the case of Script objects, for example), the Login assigned to the VARA object is used. If neither the VARA object nor the task has a Login object, an error occurs.

      Notes:

      The following applies to the Agent and Login properties:

      • You can include PromptSet variables here when using the dynamic reload feature for combo box prompts. When you use PromptSet variables in a dynamic Variable object, the Preview feature returns an error. This is because the PromptSet variables do not exist in the dynamic Variable object. However, the PromptSet variables will be resolved when objects including the PromptSet are executed.
      • The supplied templates for Backend VARA objects use the following PromptSet variables: &AGENT# for the Agent and &LOGIN# for the Login object.
    2. The content of BACKEND VARA objects is always an alphanumeric string, this is why its type is always Text. This is displayed in the Data & Formatting section and you cannot change it. In this section, you specify the data format of the value that is rendered by the VARA object. Do the following:

      • SelectLimit Text Length to set a limit to the length of the character string.

      • In Max. text length specify the maximum length. Possible values: 1 to 1024

      • Select Force upper case if you want to convert the text of the first value column to upper case.

      • In Result format specify the format of the content in the RESULT column, which is the first column that is displayed in the preview. The result column can show a combination of value columns and any other characters.

        Column numbers that are specified in curly brackets { } in the Result Format field are replaced by the value of the relevant column.

        Example:

        • Value column 1: JOB1
        • Value column 2: WIN01
        • Result format: {1}_{2}
        • Result column: JOB01_WIN01

        If you do not specify a result format, the value in the Result or in the Key column is used.

        Important!

        • The result must be within the defined limits and it must match the data type. Otherwise, the result column does not show a value.
        • The limitations (min. value, max. value, limit text to) do not affect the result column but the first returned column. If the values of this column exceed the maximum range, this line is skipped. The line is not available through the VARA object.
    3. All VARA objects have a Script Access section on their definition pages that determines the error handling when scripts read the VARA object. In this section you decide what happens if scripts access the VARA object and the key to which they refer is not available.

      You have the following options:

      • Return error

        The script ends abnormally and a runtime error message is displayed in the Messages console

      • Return initial values (Default)

        The script continues executing although the key is not available. No runtime error is displayed. The report contains an empty string indicating that no key has been found.

        Tip: Ensure that the keys of VARA objects always return a value if you want to use this option.

  2. BACKEND VARA objects execute exactly one command on the target OS. This applies to both Windows and Unix. You enter the command for Windows or Unix on the Command page. For more information, see Defining the Commands for BACKEND VARA Objects.

  3. Click the Preview button to run the command on the target computer and test the results.

  4. To export the content of the preview table to a CSV file, click Export Table. All rows and column are exported. Use this function if you need to further process the content of the CSV file (paste it to a different application for further processing and so on).

  5. To copy one or more rows in the Preview table, select the Copy button. The selected rows are copied to the clipboard and you can paste them to a third party tool (Google, Sheets, Excel, text editor, and so on).

    Note: This function is available only if https is used on the Automic Web Interface .

  6. Save the object.

Predefined BACKEND VARA Objects (Templates)

An Automic Automation system has predefined BACKEND VARA objects in Client 0 in the UC _RB_VARIABLES folder. They can be used for the Dynamic Reload feature.

The Agents of these predefined objects are specified using the &AGENT# variable. Their Login objects are specified using the &LOGIN# variable. Use these names for the PromptSet variables of the required elements.

Object name Operating System Function Columns
UC_RB_VARA_PROCESSLIST Windows, Linux, AIX, SunOS

Lists the active processes.

The maximum ProcessID length may differ depending on the UNIX system used. Adjust the column length in the Variable object if necessary.

ProcessID
Process name
UC_RB_VARA_SERVICES_PAUSED Windows, Linux, AIX, SunOS Lists all paused services. Service name
UC_RB_VARA_SERVICES_RUNNING Windows, Linux, AIX, SunOS Lists all started services. Service name
UC_RB_VARA_SERVICES_STOPPED Windows, Linux, AIX, SunOS Lists all stopped services. Service name
UC_RB_VARA_USERLIST Windows, Linux, AIX, SunOS

Lists all OS users.

Windows: Active Directory for PowerShell must be installed on the relevant computer.

User (account) name

See also: