Variables can be defined in groups, also known as namespaces. This allows variables with the same name to reside in different groups and carry different information. For example, consider AS2-based processes where multiple processes can change the content-type register carrying the valuable information. As a result, you would want to preserve the original content-type received by the application, and set the resulting content-type into a different variable, but with the same name.

Register names can be preceded with a namespace prefix. The namespace is the first part of the name before the first decimal. For example, register xyz is in the default namespace, while register is in the abc namespace.

The following register namespace service operations are available for the Variables object (from the Select Action drop-down list) when configured in a process flow:

  • copy a group of variables. Duplicates registers from a source namespace to a destination namespace. After a Copy operation is performed, the registers are available in both namespaces.
  • rename a group of variables. Moves registers from one namespace to another namespace.
  • delete a group of variables. Deletes all registers in the namespace.
  • check if a group of variables exists. If any registers exist in the namespace, the process flow is passed to the Success edge. Otherwise it is passed to the Notfound edge.

Some of the available iWay components (for example the REST object, AS2 components, and many others), have an option to specify Request and Response header namespaces. The Request namespace enables an application to specify which namespace variable should be sent as part of the request. The Response namespace enables the component to save the auto-generated variables into a given response namespace, which ensures that the existing variables are not overwritten.

In the following example, the REST object is being configured to send all of the header-type variables within the req_headers namespace as part of the call. All of the response variables will be saved in the resp_headers namespace.

In another example shown below, the AS2 Emit Service has a namespace configured as well. The variables in the as2_req_hdr namespace will be sent as part of the header, the variables in the as2_req_main namespace will be sent as part of the AS2 MIME header, and the response header variables set by the AS2 Emit service will be saved into the as2_resp_hdr namespace.

Accessing the namespace variable is the same as accessing any other variable, which can be done through the _SREG() iFL function. For example: