Description:
This step sets the value of a selected XML node.
Inputs
- xmlVariable – variable that holds the XML
- xmlNodeToSet – name of the XML node to set
- valueToAssign – value to assign to the node
- loopVariable – loop variable that holds the collection index
Returns
- True – step executed successfully
- False – step failed to execute
Usage:

Example:
Let’s build and execute the “setXMLNodeDef” example.
- Create a new definition called “setXMLNodeDef” and open the definition in designer mode.
- Drag the steps from the toolbox to the canvas and connect them as shown in the diagram above.
- Define a variable or a global to store the result.
- Click the "executeSQL" step to configure its "Required" properties. Provide a name for the step. Select the connection string from the drop-down list. Enter the SQL statement. Select the result format from the drop-down list (XML or JSON). Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the "executeSQL" step to configure its "Optional" properties. Provide a variable or a global to store the result. Select 'Yes' to return a single record as the result set. Provide the SQL command timeout value in seconds. Click the button to configure the SQL parameters. Click the Save button.

- Click the "updateVariable" step to configure its "Required" properties. Provide a name for the step, then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the "updateVariable" step to configure its "Optional" properties. Enter the variable name and value. You can click the button to configure multiple variables and their corresponding values. Select No if the value is not an expression. Click the Save button.

- Click the "setXMLNode" step to configure its "Settings" properties. Provide a name for the step. Provide the variable or global name that holds the collection index value. Provide the variable or global that contains the XML value. Provide the XML name for the node value. Provide the node value. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step to view its properties. The step should add or set a new value for the XML node.

Definition Sample:
You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after the import. Then, save the definition to confirm the changes.
Click here to download the sample file.