XML VARA Objects
XML VARA objects let you store complex data as XML structures. This data can then be referenced and used in PromptSet objects, in Script objects, and other script contexts system-wide. XML VARA objects can have any number of keys. The value of each key is a structured XML.
XML VARA objects allow you to retrieve a list of Variable object values. Use the PREP_PROCESS_VAR and PREP_PROCESS_VAR_XML script function to access all or several particular entries of a variable. This prepares the processing of a data sequence.
You can use XPath expressions with XML VARA objects. Depending on your database, individual XPath expressions may work differently. If you experience such situations, check with the database vendor.
Use PromptSet variables here when you use the Dynamic Reload feature for combo box prompts. The PromptSet variables are resolved when the object that includes the PromptSet is executed.
Script Elements for XML VARA Objects
You can use the following script elements to store values in the VARA object:
- :PUT_VAR stores values
- :PUT_VAR_COL stores a value in a specific column
- :DELETE_VAR deletes one or all values
Restrictions
-
With an Oracle database, the attribute values of XML data should not contain more than 4000 characters.
-
XML data can use only character encoding that is compatible with the character encoding in the database connection.
Defining XML VARA Objects
An XML VARA object definition is made up of the following pages:
-
Common to all object types, here you define basic object information and apply custom values to it
-
Variables
Here you define the object-specific settings. Some sections on this page are common to all VARA objects and are described for all of them in dedicated topics:
- Variable Settings, see below
- Script Access
- Client 0 VARA Objects in Other Clients
-
Common to all object types, here you find a list of all versions of the object
-
Common to all object types, here you enter information that you consider important to understand the configuration and behavior of the object
To Define a XML VARA Object
Keys and values of the XML VARA object.
- Use the buttons on the toolbar to add, edit, duplicate and remove keys
- Select a key and enter the XML structure for that key in the left pane
Example:
An XML VARA object called SRV.VARA.XML has a key called SERVER NAMES with the following value:
<SERVERS>
<SERVER NAME="TestServer1">
<IP>192.168.0.1</IP>
</SERVER>
<SERVER NAME="TestServer2">
<IP>192.168.0.2</IP>
</SERVER>
</SERVERS>
To read the single values from the XML, you use the GET_VAR script function with XQUERY expressions:
:set &name# = GET_VAR('HAM.VARA.XML','TESTSERVER','/SERVERS/SERVER[1]/@NAME')
:set &ip# = GET_VAR('HAM.VARA.XML','TESTSERVER','/SERVERS/SERVER[1]/IP/text()')
:p &name# &ip#
The output is as follows:
U00020408 TestServer1 192.168.0.1
- Define the XML Variable Settings. They are identical to those of STATIC VARA objects. For a detailed description, see STATIC VARA Objects.
- Define the Script Access.
Usage
Watch this video to learn how to use STATIC and XML VARA objects to configure Workflows: Watch the Video: Configuring Workflows with VARA objects
See also: