Create Global Variables

You can create complex and simple type global variables that are available for use throughout an integration (for example, when building an expression in an assign action).

User-defined complex type variables are defined based on the WSDLs/XSDs exposed in the integration by the trigger connection and any invoke connections. These variables are then available throughout the integration for assignment and usage.
  1. On the right side of the integration canvas, click Global Variables Global variables icon.
  2. Click Add Variable if no global variables currently exist. Otherwise, click +.
  3. Enter a name and select the data type from the drop-down list. The Object data type is considered a complex type.

    The Global Variables tab is selected. To the right is the Integration Properties tab. Below are the Name and Type fields are shown. A delete icon appears to the right of the name.

    You can also use integration properties as global variables. Integration properties are user-defined properties that can be used as read-only data by actions in an integration (for example, by notifications and logs). Integration properties are external to the integration. For example, an email address used by a notification action in an integration can be externalized as a sendTo integration property. This enables the property to be configured without the need to edit the integration or pass the value at runtime.

  4. If you add a global variable that is an Object data type, the panel is expanded on the left to display a Sources tree with all the elements from the request object.
  5. Expand the tree and drag an element (root/child) to the Type field. This marks the current global variable type as a selected node type. The Type list selection changes from Object to the node name that you selected.

    The Input Sources panel appears on the left. Below is the Sources tree of elements. A search icon also appears. On the right, the Global Variables tab is selected. To the right is the Integration Properties tab. Below are the Name and Type fields are shown. The Type field has a Clear icon and Switch to Developer Mode icon. A delete icon appears to the right of the name.

    Note the following complex data type design rules:

    • Complex types are only based on XML root elements. If you select a nonroot element when creating a complex type global variable, a WSDL is automatically generated defining it as a root element for use throughout the integration.

    • Because complex type global variables are based on WSDLs/XSDs introduced into the integration by the trigger connection and invoke connections, there may be an impact when the trigger or invoke is deleted, modified, or regenerated. Global variables react to these design changes, which may result in invalid usage/assignments.

  6. Click + to add more global variables. You can add a maximum of 20 global variables.
  7. Click Save when complete.
  8. If you want to edit a global variable, click Delete Delete icon to delete the variable, then recreate the variable. You cannot edit global variables.
    The global variables you created are now available for selection in other parts of the integration canvas, such as in an assign action.