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:
|
Name | Unique name of the variable Possible values:
|
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., |
Initialize variable | In the Properties view in property |
Read variable | Insert a new variable component with the identical name, and set the property |
Test variable | Insert a new variable component with the identical name, and set the property |
Delete variable from memory | Insert a new variable component with the identical name, and set the property |
Access process variables from within XSL mappings | Use the |
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
| |
X4PREVACTION | Outputs information (action ID, text label, and status code) about the preceding process step in an XML document Example
CODE
|
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.
<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: