EXEC VARA Objects

Use EXEC VARA objects as intermediaries that read and pass on the values returned by other executable objects. These values may affect the subsequent execution of objects or trigger the execution of objects. You store the readouts in the script variables that are defined in the EXEC VARA object. The VARA object itself has no input parameters.

The names of the parameters in the EXEC VARA object and in the PromptSet of the executable object that supplies the return codes must be identical.

Use PromptSet variables here when you use the Dynamic Reload feature for combo box prompts. The PromptSet variables are resolved when the object that includes the PromptSet is executed.

An EXEC VARA object definition is made up of the following pages:

  • General Page

    Common to all object types, here you define basic object information and apply custom values to it

  • Variables

    Here you define the object-specific settings. Some sections on this page are common to all VARA objects and are described for all of them in dedicated topics:

  • Version Management Page

    Common to all object types, here you find a list of all versions of the object

  • Documentation Page

    Common to all object types, here you enter information that you consider important to understand the configuration and behavior of the object

To Define an EXEC VARA Object

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

    • Type

      Read-only. You determine the variable type when you create the object. It cannot be changed once the variable is defined.

    • Executable object

      Name of the Automation Engine executable object from which this EXEC VARA object reads the values. Type it or click the icon to open a dialog and search for it.

      Note: Schedule objects should not be used with EXEC VARA objects.

    • Result variable

      Name of the script variable that is used for the return value of the executable object

  2. In the Parameters section specify the list of parameters and variables that are available in the executable object. Their values can be either:

    • Direct values, such as 5342
    • Reference variables, such as &reftext#

      Trailing spaces at the end of values are removed when saving EXEC Variables

      You can include PromptSet variables here when using the dynamic reload feature for combo box prompts. When you use PromptSet variables in a dynamic VARA object, the Preview feature returns an error. This is because the PromptSet variables do not exist in the dynamic VARA object. However, the PromptSet variables will be resolved when objects including the PromptSet are executed.

    Treat these parameters as though they were PromptSet/read buffer values. When a VARA object calls the executable object, it uses :PUT_PROMPT_BUFFER to set the specified parameters. To read and use these values in the called executable object, you must use the :READ command. This command reads in the values of variables of the same names. The values depend on the parameters that are set in the calling EXEC Variable object.

    Important! It is not sufficient merely to define the variables on the Variables page under Variables & Prompts for the called executable object.

    For more information, see :PUT_READ_BUFFER, :PUT_PROMPT_BUFFER.

  3. Define the Data Types and Formatting.

  4. Define the Script Access.

  5. Click the Preview button to see a preview of the result values stored or transferred is displayed.

  6. 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).

  7. 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 .

  8. Save your changes.

To use an EXEC VARA Object in a precondition

  1. In an executable object, include code like the following:
  2. :SET &RET# = "Y"

  3. Create an EXEC variable and point it the executable object.
  4. Access the EXEC variable in either a:
    • Script with the following code, :SET &TEST# = GET_VAR(VARA.EXEC)
    • Prompt or precondition with, {VARA.EXEC}

To Use an EXEC VARA Object as a Data Sequence

If you want to use an EXEC variable to pass a list of values (e.g. for using the result in a PromptSet dropdown), do the following:

  • You can use data sequences for this purpose (:CREATE_PROCESS, ....).
  • The first line is always a header line.
  • You have to return the saved data sequence with SAVE_PROCESS().
  • The process must be saved directly in the object that is used for EXEC variable (Workflows with JOBS and JOBS created that saved and published the data sequence do not work).

In an executable object, in order to return a list of values, include something like the following:

:SET &HND# = CREATE_PROCESS(NEW)

! add the header line

:SET &CHECK# = PUT_PROCESS_LINE(&HND#, "Header A;Header B; Header C", ";")

!fill the process with another one!

:PROCESS &HND_SOURCE#

:   SET &CHECK# = PUT_PROCESS_LINE(&HND#, "Value1;Value 2; Value 3", ";")

:ENDPROCESS

! save process

:SET &RET# = SAVE_PROCESS(&HND#)

:PUBLISH &RET#,,TOP

:CLOSE_PROCESS(&HND#)

In the VARA.EXEC the executable object, point to the object with the content about. The return value would be set to &RET#.

See also: