writeFile Step
Description:
This step writes text content to create a TEXT file.
Inputs
- contentVariable -Variable/Global that holds the content
- txtVarGlobalFilePath – Variable/Global that holds the output file path
Returns
- True – step executed successfully
- False – step failed to execute
Usage:

Example:
Let’s build and execute the “writeTxtFileDef” example.
- Create a new definition called “writeTxtFileDef” and open the definition in designer mode.
- Drag a “updateVariable, writeFile” step to the canvas.
- Connect the dots between the “Start” and the other steps, as shown above.
- Configure a variable or a global to store the text and the output file path.
- 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. Click the button to configure multiple variables and values. Provide the variable and value. Select “No” for “Has Expression” if the variable value is not a C# expression. Click the Save button.

- Click the “writeFile” step to configure its “Settings” properties. Provide a name for the step. Provide the variable or global reference to hold the text content. Provide the variable or global to have the output file path. 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 the properties. The step should write the contents from the variable or global to the specified output TEXT file.

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.