Global variables exist only at runtime but they can be defined and are listed with other resources under a project node. Some global variables are pre-set by the system while others will be defined for use within a project. A list of preset global variables is given in Global variable summary. The list displayed for any project includes these system global variables as well as those defined for a particular project. For example there may be text that you want to reuse in many actions, or email addresses used throughout a project. These can conveniently be treated as variables so that any alteration is made only once and then automatically updates all actions that use the variable throughout the project.
To view global variables expand a project by pressing + next to the project name then double click the Global Variables heading. You will see the variables defined in this project in the Details pane. System global variable names are displayed at the top, see Global variable summary, project variables at the bottom of the list.
To delete a global variable first select it and then choose Delete Global Variable from the right-click menu. You must then confirm that you do indeed want to delete the global variable.
Global variables can be used in various ways. For example a global variable may hold a single value that can then be accessed by other actions or activities in the system. See Email action properties for a sample use of an email address global variable. Another example is given in Web service action properties where the web service request is for the date of Easter next year, and the value obtained from the web service is placed in a Global variable EASTER_DATE, ready to be emailed out as required. A more complex situation is described in the topics described in How to provide a web service. Here a structured SOAP message is placed in a global variable and the information accessed by creating a data transfer action from the SOAP message source data source to some appropriately structured target. See especially 1. Create global variables, 4. Create first data transfer and 5. Create second data transfer for details of the example which involves global variables being used to hold information from SOAP messages. In fact global variables can be a source or a target data source for a data transfer, see Global variable data source for more.
Often global variables will be accessed by a Scriptlet action, where Jython script can refer to the global variable in order to use the information it expresses, see Scriptlet action overview, Scriptlet action properties for more information, and Edit scriptlet for an example that involves use of a system global variable.
Other related topics include New global variable, Global variable summary, Global variable data source,