clsStoreFileInDB step
Description:
This step stores the file as a record (or replaces it) in the deFileStore table of the FlowWright database.
Inputs
- pathToFile – File name with actual server path (e.g., C:\temp\12345.pdf or equivalent variable.Path reference)
- removeFile – Remove file (Yes / No). Configure YES to remove the original file from the file system referred to in the actual path after storing it in the deFileStore table.
- existingFileID – Provide existing File ID to replace with new File ID
- varGlobalToStoreID – Variable / Global to store File ID
Returns
- True – step executed successfully
- False - step failed to execute
Usage:

Example:
Let’s build and execute the “storeFileInDBDef” example:
- Create a new process definition named “storeFileInDBDef" and open it in designer mode.
- Drag a “storeFileInDB” step to the canvas.
- Connect the dots between the “Start” step and “storeFileInDB” steps, as shown above.
- Define a variable or a global to store the File ID.
- Click the “storeFileInDB” step to configure its “Required” properties. Provide a name for the step, the source file path, and a variable or global reference to store the File ID. 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 “storeFileInDB” step to configure its “Optional” properties. Select “Yes” to remove the file using its File ID from the provided path. Enter the existing File ID. Click the Save button.

- 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 below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. The step stores the file as a new record in the “deFileStore” table and returns the FileID as a reference. Navigate to Process Instances, render this process instance, click the storeFileInDB step, and view varGlobalToStoreID.

- To replace the file in the “deFileStore” table, click the “storeFileInDB” step to configure its “Required” properties. Enter the step name. Enter the source file path. Enter the variable or global reference to store the File ID. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- To replace the file in the deFileStore table, click the “storeFileInDB” step to configure its “Optional” properties. Select the “Yes” button to replace. The “path to the file" input is the server path for the new file or its “variable.value”. Provide the existing file in the “storeFileInDB” table using its FileID. In this case, the variable or global to store the replaced FileID shall be the same “variable.value” as shown below.

- Save the process definition, create a new instance, and execute it. The step replaces the file in the “deFileStore” table using the FileID as a reference. Navigate to Process Instances, render this process instance, click the “storeFileInDB” step to view the properties and the variable value “varGlobalToStoreID”.
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 the import. Then, save the definition to confirm the changes.
Click here to download the sample file.