Variables & Prompts Pages
The Variables & Prompts pages are object-specific and available for executable objects. You can use the Variables page to define object variables and the Prompt Set page to add PromptSet objects and override prompt values.
This topic provides information on the following:
-
The Object Variables Page, where you define object variables.
- The Prompt Set Page, where you add PromptSet objects and override prompt values.
On the Variables page, you can define object variables for an executable object. Object variables defined here store values that can be used throughout the object including its Process Pages.
To Add Object Variables
- Click
. This adds a row to the object variables table.
- In Name enter the name of your object variable. It must start with
&
and end with#
, for example,&AGENT#
. -
Optionally, in Value enter the value of the variable.
To use a cell editor to define your variable, click the
icon on the right side of the field.
The values of object variables can be specified with or without quotation marks. If you use single quotation marks, an individual quote within the string must appear twice, as otherwise one or more characters may be removed. You can also use double quotation marks. They are always handled as normal characters and are not removed.
Value of the variable:
Will resolve as:
string1234
string1234
'string1234'
string1234
"string1234"
"string1234"
string'1234
string'1234
'string'1234' string 'string''1234' string'1234 -
You can define the object variables as external factors for the adaptive ERT calculation. In Use for adaptive ERT select the relevant data type for the variable's value from the following items:
- Nominal (= character string)
- Numeric
- Timestamp
- Date
- Time
- No ERT Usage (= do not use object variable for adaptive ERT)
This variable will then be taken into account in the adaptive ERT calculation process.
The variables defined here can be used immediately in scripting on the executable object's Process Pages. The following example uses the object variable to terminate the agent.
:IF SYS_HOST_ALIVE(&AGENT#) = "N"
: SEND_MSG "ADMIN","AE","Agent &AGENT# is not active!"
:ENDIF
To: | Do this: |
---|---|
Add a row to the table |
Click |
Edit a cell in table row |
Click the cell in the table and edit its value. |
Delete one of more rows to the table |
Check the checkbox for the row(s) and click |
Delete all rows to the table |
Check the checkbox column header and click |
Cut one or more rows and them to the AWI clipboard |
Check the checkbox for the row(s) and click |
Copy one or more rows and them to the AWI clipboard |
Check the checkbox for the row(s) and click |
Paste row(s) from the AWI clipboard to the bottom of the table |
Click ![]() |
Inheriting from Parent Objects
The Inherit from Parent setting determines whether object variables are inherited from parent objects. When an executable object is used as a schedule or workflow task, it can use the Schedule or Workflow's object variables. This simplifies the maintenance process because it is not necessary to store or maintain the values in the individual objects.
Setting | Description |
---|---|
All variables | All object variables from the parent task are available (default). |
Only defined Variables | Only the object variables of the parent task that have been defined in its Variables page are available. Prompt Set variables are only inherited if the Prompt Set object complies with these values and the value to be overwritten has not been changed in the Variables page. |
No Variables | The object does not inherit any variables from its parent task. |
Object variables (as well as prompt variables, if they use the same variable name as the parent's object variable) are passed on to:
- Workflow tasks.
- Schedule tasks.
- Tasks that are started with ACTIVATE_UC_OBJECT using the parameter PASS_VALUES.
- Child post processes of RemoteTaskManager objects.
- The Event Process page in Event objects.
- Tasks that start from within the object. This could be an object that has been defined in the Result tab in the properties of a workflow task.
Object variables (as well as prompt variables, if they use the same variable name as the parent's object variable) are not passed to:
- Tasks of a group.
- Tasks that were started manually.
- Objects that were started by the AE system. This could be a notification that starts automatically (warning) before a calendar's validity date expires.
The values of objects that are activated using ACTIVATE_UC_OBJECT and the parameter PASS_VALUES are inherited regardless of the Inherit from Parent setting.
PromptSet and object variables are not inherited if the child task includes a PromptSet variable of the same name regardless of the Inherit from Parent setting.
Inherited object and PromptSet variables overwrite existing object variables if they have the same name. PromptSet variables are never overridden.
The setting Inherit from Parent significantly affects all the object's child tasks. Values are directly passed on from a task to its child task. If it has been specified in an object that no values or only defined ones should be inherited, a task's child tasks cannot access all object variables of "grand parent objects". The effects are shown in the examples below.
Object and PromptSet variables can also be used in order to set particular object Attributes Page without using :PUT_ATT.
The script statement :PSET creates a new entry on the Variables page which is valid for the particular execution if the object variable does not yet exist. If an object variable of the same name already exists, its value is replaced by the new value.
If the object variable is modified by using the script elements :SET, :RSET or :READ, the value that has last been assigned is available in the object (Process, PostProcess, Child PostProcess tabs). It is not necessary to explicitly assign this value using the script element :RSET (for example, to the PostProcess tab).
If you create an object variable by using the script statement :PSET, it is automatically passed on to the parent object. If the parent object already includes an object or PromptSet variable of the same name, this variable's value will be overwritten. Subsequent parent tasks can then access this variable.
When you restart an object, the values on the Variables page will be used for object variables provided object variables have been defined through this tab. The values of certain object executions are therefore irrelevant in restarts. The reason for this behavior is that when an error occurs because of the object variable, the system can correct the value in the object and this value will then also be used for the restart.
As opposed to script variables, object and PromptSet variables do not have a particular Data Types. You can use the script function CONVERT in order to assign a particular data type to the variables.
Example: Activating a File Transfer By a Schedule
A file transfer is activated by a schedule. The following object variables are involved:
Schedule:
- &FILE# = Close_of_week.txt
- &HOST# = win01
File transfer:
- &FILE# = Close_of_day.txt
- &PATH# = C:\Temp
The file transfer's script accesses the variables &FILE#, &HOST# and &PATH#. Depending on the setting that has been made in the FileTransfer object's Variables & Prompts tab, the value assigned to the above variables changes:
Inherit from parent |
Variable content |
Explanation |
---|---|---|
All values (default) |
&FILE# = Close_of_week.txt |
The schedule's value overwrites the file transfer's value. |
&HOST# = win01 |
All the schedule's values are inherited. Therefore, the file transfer can also access &HOST#. |
|
&PATH# = C:\Temp |
This object variable is already part of the file transfer. |
|
Only defined values |
&FILE# = Close_of_week.txt |
The schedule's value overwrites the file transfer's value because it also contains the object variable &FILE#. |
&HOST# = "" |
The value of &HOST# is not inherited because the file transfer does not contain an object variable of the same name. Task activation is canceled if an attempt is made to access a non-existing or non-inherited object variable via script. |
|
&PATH# = C:\Temp |
This object variable is already part of the file transfer. |
|
No values |
&FILE# = Close_of_day.txt |
No values are inherited. Therefore, the file transfer's object variable is used. |
&HOST# = "" |
The value of &HOST# is not inherited. Therefore, it cannot be used. Task activation is canceled if an attempt is made to access a non-existing or non-inherited object variable via script. |
|
&PATH# = C:\Temp |
This object variable is already part of the file transfer. |
Example: Inheriting Values in Children and Grand Children
This example shows how values are inherited in a child workflow and beyond.
The workflow PARENTWF01 includes the objects FILETRANSFER01 and WORKFLOW01. WORKFLOW01 includes two jobs. Value inheritance between the main workflow and the file transfer is as explained in example 1.
Parent | Children | Grandchildren |
---|---|---|
PARENTWF01 Object variables: |
FILETRANSFER01 Object variable: |
N/A |
WORKFLOW01 Object variable: |
JOB02 | |
JOB03 Object variable: |
Different situations are shown below and describe how WORKFLOW01 and its settings affect the two jobs:
- In all objects, the setting "All values (default)" has been defined.
Object variables are always inherited to the corresponding child task. JOB03 can access the object variables of WORKFLOW01, as well as those of the main workflow. Therefore, &FOLDER# can be used in the job. FILETRANSFER01 obtains the object variables of the main workflow but not the ones of the other objects because they are not its parents. - WORKFLOW01 has the setting "Only defined values". WORKFLOW01 does not inherit the object variable &FOLDER#. Therefore, the other two jobs cannot access its values because values are only passed on from a task to its direct child task.
- JOB03 has the setting "No values".
The job's script does not inherit object variables. Its script remains unaffected and &HOST# obtains value "unix03".
Example: A Combination of Inheritance Features
The following example includes the various combinations and special features of the inheritance of object and PromptSet variables.
Five tasks run in a workflow (tasks 1, 2, 3, 4 and 6) and are executed one after the other. Task 5 is activated by using the script of task 4.
The workflow includes the object variables &VAR1#, &VAR2# and the PromptSet variables &TEXT1#, &COMBO1#.
- Task 1: No variables are inherited because of the setting "Inherit from parent - No variables".
- Task 2: Only includes variables that have been defined in the object itself. Only &VAR2# is inherited and set to the value JOBP2.
- Task 3: Inherits all the workflow's variables.
- Task 4: All parent variables except for &COMBO1# are inherited. The reason is the PromptSet variables of the same name are not overwritten.
The script element :PSET is used to pass the object variable &VAR3# on to the workflow. It is then available for subsequent workflow tasks.
Task 5 is activated by using the script (ACTIVATE_UC_OBJECT) and the variables are passed on PASS_VALUES). - Task 5: Includes only variables that have been defined in the object.
&VAR1# is set to the value "JOBP1" and &TEXT1# is set to "text" (workflow value). - Task 6: The next workflow task inherits all the workflow's variables including &VAR3#. This variable has been passed on to the workflow by task 4.
PromptSet objects allow you to define a series of one or more prompts. You can add one or more PromptSets objects to an executable object on its Prompt Set page under Variables & Prompts. When PromptSets are added to executable objects, the prompts pass values as prompt variables to the executable object's Process Pages.
The left Prompt Sets pane lists all the PromptSets objects that are added to the executable object.
To Add a PromptSet to an Executable Object:
- Click
.
- From the Add PromptSet dialog, browse to the Automation Engine folder where the PromptSet resides.
- Select a PromptSet object and click OK.
- For each prompt that is not read-only, you can optionally override the default value from the PromptSet object definition.
- System properties variables: System properties variables are not objects. They are the same throughout the system.
- Object properties variables: Object properties variables reference objects or their runtime instance (task).
- Automation variables: Automation variables are a predefined subset of static Variable objects used for system properties.
- Variable objects: Variable objects can be static or dynamic. Static variables store values in their object definition, while dynamic variables retrieve values from a specified data source.
This opens the Add PromptSet dialog.
Optionally specify a search in the Search field to limit the display results.
The search is case-insensitive.
Overriding a prompt's definition affects the prompts in this executable object. It does not alter the default values in the PromptSet object definition. There are several ways to override prompt values.
To override a prompt value with: | Do this: |
---|---|
A predefined variable or A text string that includes one or more predefined variables |
Click the prompt's label. Clicking a prompt's label toggles the field between a direct entry field and a variable entry field. The image below shows a direct entry Combo box prompt. ![]() By clicking the All Objects label, it becomes a variable entry field. The label is shown with a gray background and a
This text can include any combination of: System properties variables and object properties variable are specified with a leading & and a closing #. Variable objects (including automation variables) are specified with a leading { and a closing }. These text conventions allow you to use any kind of variable with additional text if the prompt allows it. For example, you might have a prompt value of {PREFIX}_&$CLIENT#. Date and time elements cannot be stored if they do not include default values. If the current time/date should always be displayed as default values when the prompt opens, use the predefined variables &$PHYS_DATE_format# and &$PHYS_TIME_format# for this purpose. Please take into account that the only date format that is supported when you use variables for default values is YYYY-MM-DD. |
The value from parent workflow or schedule's object variable |
Click the prompt's label to toggle it to a variable entry field.
By clicking the prompt's label, it becomes a variable entry field. The label is shown with a gray background and a Do not use the |
Text in a text field or combobox |
Type into the text field or combobox.
|
Selectable options from a text field |
Some prompts allow you to select single values, multiple values, or file names from a list. These fields include a ... button to their right. Click it to open a pop-up dialog and select one or more values (depending on the prompt's definition).
|
An option from a combobox |
The option from the combobox.
|
Options from checkboxes |
The checkbox options.
|
An option from a radio button |
The radio button option.
|
A number |
The number.
|
A date and/or time |
The date and/or time.
|
Re-ordering Prompts
If more than one PromptSet object is assigned to an executable object, they are called from top to bottom. To re-order PromptSets, drag and drop or use the and
buttons.
Removing Prompts
To remove prompts, select the prompt and click the button.