Set XML Value

Use this feature to set the XML node value

Last published at: February 21st, 2025

setXMLNode Step

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. Provide the SQL statement. Select the result format from the drop-down list (XML, JSON). Click the Save button. Note: Click the "AI Predict" button for the Copilot to 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 value. Select 'Yes' to obtain a single record as the result set. Provide the SQL command time 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. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description. 

 

  • Click the "updateVariable" step to configure its "Optional" properties. Provide the variable name and the value. You can click the button to configure multiple variables and their corresponding values. Select No if the value does not have 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 has the XML value. Provide the XML name to set 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” setting configuration is necessary for documentation and also measures the workflow progress and the 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 then execute it. Render the process instance. Click the process step to view its properties. The step should add/set a new value to 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 import. Then, save the definition to confirm the changes.

Click here to download the sample file.