Write to a text file

Use this step to write contents to a text file.

Last published at: July 27th, 2024

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.” 
  • Select the definition and click the “design” button
  • Drag a “writeFile” step from the toolbox
  • Connect the dots between the start and “writeFile” step
  • Configure Variable variable.newFilePath as string 
  • Click the “writeFile” step to configure its “Settings” properties. Provide a name to the step. Provide a variable/global that holds the text content or input the context in the space. Provide a variable/global to hold the output file path after execution.

 

  • 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 process instance, and execute. Render the process instance. Click on the process step to view the properties. The step should write the contents from the variable/global to the output TEXT file specified. Render the completed process instance to view the step properties.