Description:
The Generate XML workflow step generates XML using a specified main node name and mapped XML node information. The generated XML is stored in the specified Variable or Global variable for use by subsequent workflow steps. The XML definition identifies the step as a Development category Process step with two incoming and two outgoing connections.
The step supports:
- Defining the main node name for the generated XML.
- Mapping XML node information.
- Using text, Variables, and Globals in the XML-generation process.
- Storing the generated XML in a Variable or Global variable.
- Reusing the generated XML in subsequent workflow steps.
- Preparing structured XML data for downstream workflow processing.
- Returning a True or False result for subsequent workflow processing.
Inputs
- mainNodeName -- The Main node name property specifies the main node name for the XML being generated.
- Xml node information -- The Xml node information property specifies the XML node information used to construct the generated XML.
- Variable/Global to store the XML -- The Variable/Global to store the xml property specifies the Variable or Global variable in which the generated XML should be stored.
Returns
- True – The True return path can be connected to the next workflow activity when the XML-generation operation completes successfully.
- False – The False return path can be connected to an alternate workflow path, such as error handling, logging, notification, or other recovery processing.
Usage:
The Generate XML step is typically placed after the workflow has collected or prepared the information that needs to be represented as XML.
The workflow supplies:
- A main node name.
- XML node information.
- A Variable or Global in which to store the generated XML.
The resulting XML can then be passed to subsequent workflow activities.
A typical workflow pattern is:
Prepare Data → Generate XML → Use Generated XML
The generated value can then be used by later workflow steps to:
- Populate or update workflow Variables.
- Prepare structured integration data.
- Build XML-based messages.
- Prepare data for downstream processing.
- Pass XML to another workflow activity.
- Transform or process the generated XML.
- Create workflow output.
- Store XML for later reuse.

Typical Workflow Suggestions:
Generate XML from Workflow Data
Use the step when information collected during workflow execution needs to be represented as XML.
Example:
Collect Data → Map XML Nodes → Generate XML → Continue Processing
Generate Customer XML
A customer-processing workflow can use Generate XML to create a structured representation of customer information.
Example:
Get Customer Data → Generate XML → Store Customer XML<Customer>
...
</Customer>
Generate Order XML
You can use Generate XML in an order-processing workflow after collecting order information.
Example:
Receive Order
↓
Collect Order Data
↓
Map XML Node Information
↓
Generate XML
↓
Process Order XMLOrder can be used to represent the generated structure.
Prepare XML for an Integration
Use Generate XML to prepare structured XML data before a downstream integration activity.
Example:
Retrieve Data → Generate XML → External Integration
Build XML from Variables and Globals
The step is particularly useful when the information required for the XML is already available in workflow Variables or Globals.
Example:
Workflow Variables
↓
Map XML Node Information
↓
Generate XML
↓
Store Generated XML
Prepare XML for a REST/API Request
Where a downstream application expects XML-formatted data, Generate XML can be used to prepare the request data.
Example:
Collect Request Data
↓
Generate XML
↓
REST/API Processing
Create Structured Workflow Output
Generate XML can be used when a workflow needs to produce structured output rather than an unstructured text value.
Example:
Process Results → Generate XML → Store XML → Subsequent Processing
Generate XML for Document Processing
A document-oriented workflow can create XML containing information associated with a document or document-processing operation.
Example:
Get Document Information
↓
Map XML Nodes
↓
Generate XML
↓
Document Processing
Generate XML for Notifications or Messages
Where a downstream workflow operation requires structured XML message data, Generate XML can be used to prepare that data.
Example:
Process Request → Generate XML → Send/Process Message
Generate XML Conditionally
Generate XML can be placed on a particular branch when XML output is required only under certain conditions.
Example:
┌─ Condition A → Generate XML
Start → Decision ───┤
└─ Condition B → Other Processing
Reuse Generated XML
Because the generated XML is explicitly stored in a Variable or Global, the value can be reused by multiple subsequent workflow activities.
Example:
Generate XML
↓
GeneratedXML
↙ ↘
Step A Step B
Generate XML for Downstream Transformation
Generating XML can act as an intermediate step before additional XML processing.
Example:
Source Data → Generate XML → XML Processing → Final Output
Create Standardized XML Structures
When multiple workflow instances need to produce the same general XML structure, use a consistent main node name and XML node mapping.
Example:
Request Data → Generate XML → Standard XML Output
Example:
Let’s build and execute the “generateXMLDef” example.
- Create a new definition called “generateXMLDef” and open the definition in designer mode.
- Drag a “generateXML” step to the canvas.
- Connect the dots between the “Start” and “generateXML” steps, as shown 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, you can configure additional values.
- Define a variable or a global to store the result after execution.
- Click the “generateXML” step to configure its “Required” properties. Provide a name for the step and the main XML node. Click the button to enter XML node information. Specify a variable or a global to store the result. Click the Save button. Note: Click the "AI Predict" button for Copilot to add new process steps that match your process description.

- Click the button to enter XML node information. A pop-up window appears for configuration. Click the Add Row button to insert an empty row. Enter the XML node name and value. Click the Save button. You can add multiple XML nodes and values using the Add Row button. Click the Save button.

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

- Save the process definition, create a new process instance, and execute it. Render the process instance and select the Generate XML step to view its properties. When the workflow reaches the Generate XML step, it uses the configured main node name and XML node information for the XML-generation operation, and stores the resulting XML in the specified Variable or Global. The resulting Variable or Global can then be inspected or used by subsequent workflow activities.

- Click the process step to view its properties. The step should generate XML from the provided data and store it in a result variable or a global variable.

Tips:
- Use a meaningful main node name that clearly represents the purpose of the generated XML.
- Make sure the Xml node information is configured before executing the step.
- The
xmlNodeDataproperty is required. - Use a meaningful Variable or Global name for the generated XML, such as
GeneratedXML. - Keep the XML structure consistent when the same type of XML is generated repeatedly.
- Prepare and validate the source data before mapping it into XML nodes.
- Test the generated XML with representative workflow data before deploying the process.
- Verify that the expected Variable or Global contains the generated XML after execution.
- Use the generated XML Variable or Global consistently in downstream activities.
- When using XML for an external integration, verify that the generated structure matches the receiving application's requirements.
- Keep the main node name consistent with the intended XML structure.
- Use the True path for normal continuation and configure the False path for an appropriate alternate or error-handling path.
- Consider logging successful XML generation without exposing sensitive XML content.
- If multiple workflow activities need the same generated XML, store it once in a Variable or Global and reuse it.
- Test the workflow after changing the XML node mapping.
- Verify the XML output with different combinations of source values, including missing or unexpected values.
- Keep XML node mappings maintainable as the workflow evolves.
- Avoid assuming behavior not specified by the step definition, such as XML escaping rules, duplicate-node handling, namespace handling, or ordering behavior, unless those behaviors have been confirmed in the FlowWright implementation.
Definition Sample:
Before executing a workflow containing the Generate XML step, verify:
- The Generate XML step has been added to the process definition.
- The main node name has been configured.
- XML node information has been mapped.
- A Variable or Global has been defined to store the generated XML.
- The step is connected to the appropriate upstream activity.
- The True path is connected to the normal continuation path.
- The False path is connected to alternate/error handling where required.
- Logging has been configured if workflow progress needs to be documented.
- The generated XML has been tested using representative workflow data.
- Downstream activities reference the correct Variable or Global.
The reference documentation similarly recommends verifying required configuration, Variables, workflow references, and downstream True/False paths before execution.