Description:
The Set XML Value workflow step sets the value of a specified XML node in XML held by a FlowWright Variable or Global variable.
The step accepts a Variable or Global variable containing the XML, a Variable or Global variable containing the collection index, the name of the XML node to update, and the value to assign to that node.
The step supports:
- Setting the value of an XML node.
- Working with XML stored in a Variable or Global variable.
- Specifying a collection index through a Variable or Global variable.
- Identifying the XML node by name.
- Assigning a dynamically supplied value to the XML node.
- Returning a success or failure result.
This step can be used for:
- Updating XML-based workflow data.
- Modifying values within XML collections.
- Preparing XML before sending it to another system.
- Updating XML generated by an earlier workflow step.
- Applying workflow-specific values to XML.
- Building or modifying structured data for subsequent processing.
- Updating XML values inside repeated or indexed data.
Inputs
- Variable/Global that Holds the Collection Index – Specifies the Variable or Global variable containing the collection index used by the step.
- Variable/Global that Holds the XML – Specifies the Variable or Global variable containing the XML that will be modified.
- Name of the XML Node to Set – Specifies the XML node whose value should be changed.
- Value to Assign the Node – Specifies the value that should be assigned to the selected XML node.
Returns
- True – The True return path represents successful execution of the XML update operation.
- False – The False return path represents an unsuccessful execution.
Usage:
The Set XML Value step is typically placed after XML has been generated, retrieved, or assembled within a workflow.
The workflow can provide the XML through a Variable or Global variable and dynamically determine:
- Which collection index should be used.
- Which XML node should be updated.
- What value should be assigned.
This makes the step useful when XML must be modified as part of a larger workflow before being passed to another activity.
Typical downstream uses include:
- Sending the updated XML to an external system.
- Storing the modified XML.
- Processing the updated XML through another workflow step.
- Generating a document or request from the modified XML.
- Making subsequent decisions based on the updated value.
- Continuing an XML transformation process.

Typical Workflow Suggestions:
Update XML After Data Collection
Use Set XML Value after collecting information from a form, database, or another workflow activity.
Example:
Collect Data → Set XML Value → Process XML
This allows workflow-generated values to be applied to existing XML.
Update Status in XML
Use the step to change a status value before passing XML to another workflow activity.
Example:
Process Request → Set XML Value → Send XML → Complete
For example, a status could be changed from:
Pending
to:
Approved
Prepare XML for an External System
Modify XML before sending it to an external application or service.
Example:
Generate XML → Set XML Value → Send Request → Process Response
This is useful when workflow-specific values need to be added or changed before transmission.
Update Collection Data
Use the collection-index input when processing XML containing repeated or collection-based data.
Example:
Retrieve XML → Determine Collection Index → Set XML Value → Continue Processing
The step explicitly defines a property for a Variable/Global that holds the collection index.
Dynamic XML Updates
Use Variables or Global variables to determine the value that should be assigned.
Example:
Get Workflow Data → Determine New Value → Set XML Value → Continue
The valueToAssign property is a required string, allowing the value to be supplied as workflow data.
Update Multiple XML Values
Use multiple Set XML Value steps when several XML nodes need to be changed.
Example:
XML Input → Set Status → Set Priority → Set Owner → Send XML
Each step can target a different XML node and assign a different value.
Build a Processing Pipeline
Use Set XML Value as one stage of a larger XML-processing workflow.
Example:
Get XML → Set XML Value → Validate XML → Transform XML → Send XML
Apply Workflow Decisions to XML
Use a decision step to determine a value and then update the XML accordingly.
Example:
Evaluate Request → Determine Status → Set XML Value → Continue
Update Customer or Transaction XML
Modify XML containing customer, transaction, order, or other business information.
Example:
Retrieve Customer XML → Determine New Status → Set XML Value → Save / Send XML
Update Indexed XML Records
When XML contains repeated records, use the collection index input to identify the relevant collection position.
Example:
Retrieve Collection → Determine Index → Set XML Value → Process Selected Record
The XML confirms the existence of the collection-index property but does not document the precise indexing behavior.
Success and Failure Handling
Use the two return paths to separate successful XML updates from unsuccessful executions.
Example:
Set XML Value → True → Continue Processing
↳ False → Log Failure / Retry / Notify Administrator
The step explicitly provides True and False return values.
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.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, additional values are available for configuration.
- Define a variable or a global variable 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. When the workflow reaches the Set XML Value step, FlowWright uses the configured collection index, XML Variable or Global, XML node name, and replacement value to perform the XML update operation. These inputs are defined directly by the step properties. The workflow then follows the True or False return path according to the execution result.

Tips:
- Make sure the Variable or Global variable supplied to Variable/Global that holds the XML contains valid XML.
- Verify that the XML node specified in the Name of the XML node to set exists where the step expects it.
- Use Variables or Global variables when the replacement value needs to be determined dynamically.
- Clearly name Variables used to hold XML so their purpose is easy to identify.
- Clearly name the Variable or Global variable used for the collection index.
- Validate the collection index before executing the step when working with repeated XML data.
- Test the XML structure with representative data before deploying the workflow.
- Test both the True and False return paths.
- Use the False path for logging or exception handling when an XML update fails.
- When updating several XML nodes, consider using separate Set XML Value steps so each change is easy to understand and troubleshoot.
- Verify that the XML node name is specified exactly as expected by the FlowWright implementation.
- Avoid assuming a particular XML path or namespace syntax unless it has been verified in your environment.
- Test XML containing repeated nodes when using the collection-index property.
- Test different collection indexes to confirm the expected indexing behavior.
- Validate the resulting XML before sending it to an external system.
- Keep the XML structure consistent between workflow instances.
- If the XML originates from an external system, validate the input before attempting to modify it.
- Be careful when dynamically constructing node names and values.
- Use the True path to ensure that downstream processing occurs only after the update succeeds.
- Keep the original XML available when troubleshooting complex XML transformations.
Notes:
- The Set XML Value step is defined in the Engine category with the internal name
setxmlnode, label “Sets the value of an XML node”, and display name “Set XML Value.” - The step is implemented by
FlowWright.Workflow.SetxmlnodeinFlowWright.Workflow.dlland is a Process step with 2 incoming connections and 2 outgoing connections. - The XML defines four configurable properties, all of which are required.
- The four properties are:
-
loopVariable– Variable/Global that holds the collection index -
xmlVariable– Variable/Global that holds the XML -
xmlNodeToSet– Name of the XML node to set -
valueToAssign– Value to assign the node - All four properties use the
stringdata type, implemented byFlowWright.DataTypes.ClsTextBox. - The step provides two predefined return values: False and True.
Definition Sample:
You may download the sample definition(s) from the link provided and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Verify and complete any missing configuration after importing the sample, including:
- Variable/Global containing the collection index
- Variable/Global containing the XML
- XML node name
- Value to assign
- Environment-specific Variable or Global mappings
- Downstream True and False workflow paths
Before execution, verify that the XML structure and target node are appropriate for the supplied collection index.
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.