This section explains the procedure for deleting substructures, text and attribute values from a UDA.
Prerequisite:
The process definition has a User Defined Attribute of type XML from which a substructure, text element or attribute value can be removed.
You might want to remove substructures, text or attribute values from a UDA of type XML. This can be achieved using the Delete from XML Java Action.
To delete substructures, text and attribute values:
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.
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.
Expand XML Actions and double-click Delete from XML.
The Action Editor - Delete From XML UDA dialog is displayed. It automatically shows the first UDA of type XML you have defined for the process definition or node (CustomerName UDA, in the example), and provides a default description:
Figure 11.25 Displaying the Action Editor dialog
Type a descriptive name and your notes for the Java Action in Action Name and Notes fields respectively.
From the Target UDA drop-down list, select the UDA from which the substructure, text or attribute value is to be removed.
The Target UDA drop-down list displays only UDAs of type XML.
From the XPath drop-down, select an XPath expression of the Target UDA.
The XPath expression refers to that part of the UDA where the substructure, text or attribute value will be removed from. In the example, the first name is removed from the UDA. Only the surname remains (refer to section 11.3.1 Adding a Substructure in XML, for the complete substructure):
Figure 11.26 Deleting a substructure
Optional: If you want to edit the XPath expression that you selected in the XPath drop-down list, click the Edit button located next to the XPath drop-down list.
XPath Editor dialog is displayed with the selected XPath expression in its editor area. You can edit this XPath expression and click OK to use the edited XPath expression.
Note
The edited XPath expression is displayed as the latest XPath in the XPath drop-down list.
Note
The XPath expressions related to the selected XML UDA are displayed in the XPath drop-down list. When XML Schema is defined in selected UDA, the XPath list that can be used with this XML Schema is displayed. When Initial value is defined in selected UDA, the XPath list that can be used with this Initial value is displayed. When both are defined, Xpath list of XML Schema is displayed.
Note
XPath Editor only validates the syntax of the XPath. It does not check if the edited XPath expression exists or not.
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.