JSON to XML converter step
Description:
This step converts JSON-formatted data into XML format.
The Convert JSON to XML workflow step accepts a JSON string, parses the JSON structure, converts it into its equivalent XML representation, and stores the generated XML in a FlowWright Variable or Global Variable.
This step provides an efficient way to integrate JSON-based systems with XML-based workflows, document generation processes, legacy applications, SOAP services, XML transformations, and other systems that require XML input.
The generated XML can be used immediately by subsequent workflow steps without requiring external conversion utilities or custom code.
The step supports:
- JSON to XML conversion
- Processing of JSON objects and arrays
- Automatic XML generation
- Storage of generated XML in Variables or Global Variables
- Integration with FlowWright workflow automation
- Support for downstream XML processing
This step can be used for:
- REST API integrations
- SOAP service integration
- XML document generation
- Legacy system integration
- Workflow data transformation
- Data migration
- Business process automation
Inputs
- Input JSON – Specify the JSON string that will be converted to XML.
- Variable/Global to Store XML – Specify the Variable or Global Variable that will receive the generated XML document.
Returns
- True – The JSON was successfully converted, and the generated XML was stored.
- False – The JSON could not be parsed, or the XML conversion failed.
Usage:
The Convert JSON to XML step is typically placed after REST API calls, JSON data retrieval, form processing, or data import activities that require XML output.
The workflow parses the supplied JSON, converts it to XML, stores the generated XML in the configured Variable or Global Variable, and makes the result available to subsequent workflow steps.
A typical workflow might look like this:

Once the XML has been generated, later workflow steps can:
- Execute XPath queries
- Populate XML templates
- Generate reports
- Call SOAP services
- Store XML documents
- Transform XML using XSLT
- Continue workflow processing
The input JSON should be valid before this step is executed.
Example:
Let’s build and execute the “clsJSONtoXMLconverterDef” example.
- Create a new process definition named “clsJSONtoXMLconverterDef” and open it in designer mode.
- Drag a “clsJSONtoXMLconverter” step to the canvas.
- Connect the dots between the “Start” and “clsJSONtoXMLconverter” steps, as shown above.
- Click the “clsJSONtoXMLconverter” step to configure its “Required” properties. Provide a name for the step, the JSON code, and a variable or global reference to store the XML result. Then 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.

- The JSON code is provided here for reference.
{"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
"name": "sun1",
"hOffset": 250,
"vOffset": 250,
"alignment": "center"
},
"text": {
"data": "Click Here",
"size": 36,
"style": "bold",
"name": "text1",
"hOffset": 250,
"vOffset": 100,
"alignment": "center",
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
}
}}
- Save the Process Definition. Create a new Process Instance and execute it. When the workflow reaches the Convert JSON to XML step, FlowWright parses the supplied JSON, converts the data to XML, and stores the generated XML in the configured Variable or Global Variable. If the operation completes successfully, the workflow follows the True return path. If the JSON is malformed, empty, contains unsupported structures, or cannot be converted, the workflow follows the False return path. Click the process step to view its properties. The step should successfully generate the XML document, populate the configured Variable or Global Variable, and return True upon completion.

Tips:
- Verify that the input JSON is valid before executing the workflow.
- Store the generated XML in a Global Variable when multiple workflow steps require access to the converted document.
- Use this step immediately after REST API calls that return JSON responses.
- Combine this step with XPath, XML Parser, or XML Validation steps when additional XML processing is required.
- Validate the generated XML before submitting it to downstream systems that enforce XML schema validation.
- Use the True and False return paths to implement appropriate success and exception handling.
- Combine this step with REST Call, Get Form Instance Data, Generate Document, SOAP Web Service, or XML Transformation workflow steps to automate cross-platform data integration workflows.
Notes:
- The input must be valid JSON.
- The generated XML is stored in the configured Variable or Global Variable.
- Nested JSON objects and arrays are converted into equivalent XML elements.
- Invalid or malformed JSON input causes the step to follow the False return path.
- This step converts data formats only and does not modify the original JSON.
- The resulting XML structure is determined by the input JSON structure.
- The workflow should include appropriate handling for both True and False return paths.
- JSON-to-XML conversion is particularly useful when integrating modern REST-based applications with XML-based enterprise systems.
Definition Sample:
You may download the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition page.
Note: Verify and complete any missing configuration after importing the sample, including:
- Input JSON
- XML output Variable or Global Variable mapping
- Workflow variable definitions
- Downstream XML processing configuration
- Environment-specific settings
After verifying the configuration, save the Process Definition before execution.