Familiarize with XML variables
- Last UpdatedDec 17, 2025
- 5 minute read
Perform the following steps to familiarize with AVEVA Work Tasks XML Variables:
-
Create an XML Variable and define the schema
-
Updating the XML Variable
-
Display the value in an Information activity
Create XML variable and define schema
-
Create a workflow.
-
Open the Process Designer.
-
Right-click the Start activity, and then click Activity Properties. The Start Activity Properties appears.
-
Click the
icon near the XmlVariables property in the activity properties to declare the variable.
The XmlVariables window appears. All XML Variables added for the workflow are displayed in rows in the grid. The variable properties that are specific to an XML Variable are displayed in the Variable Properties section for an XML Variable.
-
Click New Variable to add a variable. The Variable Name is enabled.
-
Enter the name of the new XML Variable in the Variable Name field and a description in the Description field.
-
Select XMLDocument from the Type list. For more information about XML Variables and the different types, see XML Variables topic in Developing Business Processes section.
-
Build the XML Schema in the XML Variable interface in the following format:
<Employee>
<Name>
</Name>
<Department>
</Department>
</Employee>
-
Click the icon
near the “root” element. In the dialog box that appears, click Edit to edit the root element.
-
Enter the Name as “Employee”, and select the Type as “element”. Click OK to save the element value.
-
Click the
icon near the Employee element, and then click Add to add the child elements.
-
Enter the Name in the Name field, and select Type as element. Click OK to save the data.
-
Similarly, add one more element Department to the XML Schema.
-
Select the type for Internal Storage as Variable since the value for this XML Variable has to be updated and stored as a variable.
-
Click Save Variable to save the newly created XML Variable.
Update XML variable
To update the value of the XML Variable for the subsequent activities you have to add the Update Variable activity from the Engine Activities list.
-
Select the Engine Activities.
-
Drag the Update Variable activity to the Process Design area.
-
Right-click the Update Variable activity, and then select Activity Properties.
-
Enter a Name and Description for the activity.
-
Configure the Set Variable property as explained:
-
Click the icon near the Set Variables property. The Update Variable appears.
-
Click Select. You can see a tree view containing the list of Variables and XmlVariables.
-
Click on
near XmlVariables. Now you will be able to see the XmlVariables that was created in
the section Creating XML Variables and defining XML Schema.
-
Click on the node Name and enter a value for the variable. For example, enter the name "John".
-
Click on the node Department and enter a value for the variable. For example, enter the department as "Research".
-
Click OK to update the values assigned
-
Click Save in the Activity Properties pane to save all the data entered.
-
Display XML variable value
-
Select Human Activities.
-
Drag Information activity to the Process Design area.
-
Right-click the Information activity, and then select Activity Properties.
-
Enter a Name and Description for the activity.
-
Configure the Actor to whom the information has to be sent:
-
Click the
icon near the Assign Actor(s) property. The Assign Actor(s) appears. You have to assign the Information task to the user who has alerted the
workflow. For this, you have to specify a small expression.
-
Select the required provider from the Providers list.
-
Select ID from the first drop-down list.
-
Keep the operator as default =.
-
Select Variable from the next drop-down list.
-
Select Variable.SubmittedBy.ID in the last drop-down list, and click Add.
-
Click Update to save the property value.
-
-
Configure the Subject property as explained:
-
Click the
icon near the Subject property. The Subject appears.
-
Enter the subject in the text area. To customize the subject and append the subject by selecting some XML variable and building an expression follow the next set of steps.
-
Type 'The Employees Name is:' in the text area.
-
Select XML Variables from the first drop-down list.
-
Select the XML Variable you had declared in the Start activity from the second drop-down list, that is Employee.
-
Select the Name node from the XML Schema in the third drop-down list, and click Append.
-
Similarly, append the Department value. Now you have the Subject as:
-
Click Update.
-
-
Click the Save button in the Activity Properties to save all the data entered.
-
Click the Link icon in the tool bar to create the following links:
-
Start Activity to Employee XML Variable Updation activity
-
Employee XML Variable Updation activity to Displaying Employee Information activity.
-
-
Right-click on the link between Employee XML Variable Updation activity to Displaying Employee Information activity, and then select the set the link the output value as Updated.
Publish workflow
-
Click Publish and Test Run from the menu bar. The Process Execution page appears.
-
Verify all the activities that have been executed successfully.
Note: If the Status is "Execution Pending" in Process execution, then click the Refresh button to get the latest status.
View Inbox
To view the Information task assigned to the actor who alerted the workflow, select the Inbox from the Enterprise Console menu button. You have successfully created a workflow that uses an XML Variable and implemented it in your activity.