Adding Variables to Process Steps

Variables are applied to process steps in the Process Editor. When you create a new step or select an existing step, use the Parameters option for the selected step to select the variable that you want to use. If you are using static data, then replace the static data with the variable that you have created.

Use variables in process steps when:

  • A field value is unknown before execution. The value of a variable is changed when an application returns a value that is randomly generated. For example, creating an order generates an order number, and the order number can be stored in a variable for verification or other uses.
  • A value must be derived from a combination of other variable values and/or static values. The variable value is based on calculations or concatenations of other variables or static values. These operations are performed by process steps and the resulting value is stored in a variable. For example, an application requires the month and year to be added to a file name in order to locate the file within a list. The month and year can be concatenated from two variables and added to another variable containing the file name. Then, the variable can be used to locate a file within the list.
  • Process execution order varies. The names of processes can be named by a variable, so that each iteration through the recordset calls a different process. For example, you may have a set of processes for your application to add an account, add a transaction, and verify a portfolio. Instead of creating three separate Execute Process steps, you can associate a recordset with your master process and have one Execute Process step that calls an Account processes variable. Since the variable is associated with a recordset containing the names of all the processes you want to execute, each of the processes are executed in the order they appear in the recordset.
  • You need to work with system information. Predefined system variables can be used in your process steps to capture information, such as the computer name, user name, and process name. For example, you may want to capture the system date for comparison against another date variable or get the status of the last step executed to verify the step passed.
  • You need to log into other systems or applications during execution. User-defined variables can be used in your process steps to log into other systems or applications referenced in your process execution. For example, you may have a legacy system containing data that you need to compare with data from the application you are testing. You can add a user variable in your process to input the user ID and password for the legacy system or application. You can also set a process local or project variable to the value contained in a system variable.

Skip Character

There are times when you may have variables in process steps that are not needed for process execution. When this occurs, enter a caret ( ^ ) character which is the special value that is designated as the skip character for any value in a recordset. Any step that refers to a variable whose value contains this character is skipped. For example, if certain fields or objects are enabled or disabled based on data values, the skip character can be used in a recordset to designate when disabled fields should be skipped.

This skip character of a variable is only viewable in the Execution dialog. Any steps that use variables with skip characters are marked as skipped and not be executed. Both input and output parameter variables are checked. The only way to alter a variable with a skip character during execution is with a write or a read recordset action at the process or step level.

  • Use the keyboard shortcuts <Ctrl> <C> and <Ctrl> <V> to copy and paste existing variables from one step to another step.

To add variables to a step:

  1. In the Navigation pane, click Processes.

The Processes window appears.

  1. In the Processes Summary pane, double-click a process.

The Process Editor appears.

  1. Click the Steps tab.

The Steps tab appears.

  1. Select a step in which you want to add a variable as a parameter.
  2. In the Parameters tab, enter a value in the field or click the Select Variable button next to the field in which you want to add a variable.

If you clicked the Select Variable button, the Select Variable dialog appears.

  1. In the Navigation pane, select the folder that contains the variable you want to add.
  2. In the Variables Summary pane, select a variable.
  3. Click OK.

The variable appears in the Parameter field of the Process Editor.

If you chose a date or number variable, a Format text field appears under the parameter.

  1. If you want to select a specific format for this variable, select a format from the drop-down list or click the Select Variable button to select a format.
  2. To save the process change, click Save.
  3.  

Related Topics Link IconRelated Topics