Skip to main content
Skip table of contents

Variable

A variable stores data temporarily at runtime in the context of a process. You can access this variable from within the same Technical Process or from a subprocess of this Technical Process. Using the context: protocol, you can access variables also in XSL mappings.

Properties

Operation

Defines if the variable is initialized, read or removed

Possible values:

  • Put: Save input data from the preceding process action into the variable (default)

  • Get: Read the content of the variable, and output it to the next process action

  • Remove: Discard variable (delete it from memory). If no variable is set, the status 0 will be output.

  • Test: Checks whether a variable is set. If no variable is set, the status 0 will be output.
Name

Unique name of the variable

Possible values:

  • Any string containing alphanumerical US-ASCII characters (Aa-Zz and 0–9) and underscores (_), and which does not start with a number (e.g., Report_Data01)

Using Variables

Context variables temporarily store data in the context of a currently executed Technical Process. Each variable must be initialized first; i.e., it requires a unique name and a value is assigned (operation Put). Later in the Technical Process, the variable can be retrieved using the operation Get. Finally, using the Remove operation, you can delete variables from the memory.

Create variable component

Drag a variable component from the Palette and drop it into the Technical Process, then enter a unique variable name (e.g., Var1) within the Properties view in the Name property.

Initialize variable

In the Properties view in property Operation, choose the value Put to load input data from the preceding process action into the variable.

Read variable

Insert a new variable component with the identical name, and set the property Operation to Get.

Test variable

Insert a new variable component with the identical name, and set the property Operation to Test.

Delete variable from memory

Insert a new variable component with the identical name, and set the property Operation to Remove.

Access process variables from within XSL mappings

Use the context:// URL protocol, e.g., via the XPath expression document('context://Var1')

Context Variables

By default, Technical Process provide two context variables that give information about the currently executed process instance. You can retrieve these variables either within the process with a Variable component using the operation Get or within XSL mappings using the context: URL protocol.

X4STATE

Outputs the status of the previous process step (immediately before the current process step) in an XML document

Example

CODE
<state>-1</state>
X4PREVACTION

Outputs information (action ID, text label, and status code) about the preceding process step in an XML document

Example

CODE
<action>
   <id>4</id> 
   <label>File.tra</label> 
   <state>-1</state> 
</action>

Example

These context variables allow advanced error handling. Thus, you could output for example the error message text of an adapter together with the adapter's status.

HTML/XML
<Merge>
   <state>-1</state> 
   <error>General File Error (see log for details).</error>
</Merge>

Adapter error message and its status code merged in an XML document:



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.