Top
Systemwalker Runbook Automation Studio User's Guide
Systemwalker

11.3.3 Assigning an XML String to a User Defined Attribute

This section explains the procedure for assigning an XML string to a User Defined Attribute (UDA).

Prerequisite:

You can generate an XML string and assign it as the value of a UDA using the Assign XML to UDA Java Action. This Java Action is usually used in conjunction with the Assign UDA from XPath Java Action and an HTTP Agent. This three-component system forms a data-transfer interface to a system external to Systemwalker Runbook Automation.

To assign an XML string as the value of a UDA:

  1. Click the empty space in the Process Definition editor or select the node to which you want to assign the Java Action, to display the Properties view for the process definition or the node respectively.

  2. Select the Action Set tab. Click Add corresponding to the position where you want to add the Java Action. The Action Type List dialog is displayed.

  3. Expand XML Actions and double click Assign XML to UDA.

  4. In the Action Editor - Assign XML To UDA dialog, type a descriptive name and your notes for the Java Action.

  5. From the Target UDA field, select the UDA to which the generated XML string is to be assigned.

    The drop-down list displays only UDAs of type STRING or XML.

  6. In the Value field, type the XML string to be assigned.

    Figure 11.24 Assigning an XML String to a UDA

    In the example, Customer Info is executed at process initialization. The Java Action generates the XML string displayed in the above figure and stores it in the CustomerDetails UDA.

    Within the XML string, you can use the following tags to specify UDAs or JavaScript code:

    • {{Field <UDAName>}}

      This tag can be replaced by UDA value. The value is encoded XML. When it is encoded XML, characters that has a significance meaning will be changed. These characters are less than character (<), greater than character (>), ampersand (&), and double quotation ("). These characters are changed &lt;, &gt;, &amp;, and &quot; by XML encode.

    • {{Xml <UDAName>}}

      This tag can be replaced by UDA value. The value is not encoded XML.

      If it is XML fragment passed value, you can use this tag.

    • {{Js <JavaScriptExpression>}}

      JavaScript expression is valuated, and this tag is replaced by the evaluation result. The evaluation result is encoded XML.

    • {{JsXml <JavaScriptExpression>}}

      JavaScript expression is valuated, and this tag is replaced by the evaluation result. The evaluation result is not encoded XML. If it is XML fragment passed value, you can use this tag.

  7. Click OK.

Note

It is not necessary to compensate this action using a compensation action, because changes made by this action are in Systemwalker Runbook Automation only and they will be rolled back after the process instance goes into error state. For information on compensation actions, refer to section 11.1.7 Dealing With Errors in Java Actions.