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.
This page includes the following:
Prerequisites
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.
PromptSet variables are supported in select fields for BACKEND, EXEC, FILELIST, SEC_SQLI, SEC_SQL, SQLI, SQL, and XML variable types. Using PromptSet variables is necessary when using the Dynamic Reload (Combobox Prompts) feature.
Defining EXEC VARA Objects
An EXEC VARA object definition is made up of the following pages:
-
Common to all object types, here you define basic object information and apply custom values to it
-
Variables page, see below
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. This topic describes the EXEC-specific settings on the Variables page.
-
Common to all object types, here you find a list of all versions of the object
-
Common to all object types, here you enter information that you consider important to understand the configuration and behavior of the object
Defining the Variables Page
-
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
-
-
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 (Combobox Prompts) 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.
- Define the Data Types and Formatting.
- Define the Script Access.
- If you are logged in to Client 0, an additional section is available. For more information, see Client 0 VARA Objects in Other Clients.
- Click the Preview button to see a preview of the result values stored or transferred is displayed.
- Save your changes.
Using an EXEC Variable in a Precondition
To use an EXEC variable in a precondition, do the following:
- In an executable object, include code like the following:
- Create an EXEC variable and point it the executable object.
- Access the EXEC variable in either a:
- Script with the following code, :SET &TEST# = GET_VAR (VARA.EXEC)
- Prompt or precondition with, {VARA.EXEC}
:SET &RET# = "Y"
Using an EXEC Variable 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):
- 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: