DMS Delete Document Step
Description:
This step deletes a document from the FlowWright Document Management System (DMS).
The Delete Document workflow step identifies a document using its Document ID and permanently removes it from the document repository. The document and its associated content will no longer be available for subsequent workflow activities once deletion is complete.
This step provides an efficient way to automate document cleanup as part of document retention policies, repository maintenance, employee offboarding, project completion, or compliance-driven document lifecycle workflows.
The step supports:
- Permanent document deletion
- Document selection using a Document ID
- Integration with the FlowWright Document Management System
- Automated document lifecycle management
This step can be used for:
- Repository cleanup
- Document retention enforcement
- Project closure
- Employee offboarding
- Compliance management
- Repository administration
- Business process automation
Inputs
- documentID – Specify the Variable or Global Variable that contains the Document ID of the document to delete.
Returns
- True – The document was successfully deleted.
- False – The document could not be deleted.
Usage:
The Delete Document step is typically placed at the end of document lifecycle workflows after all required approvals, archival, retention, or business processes have been completed.
The workflow retrieves the specified document using its Document ID and permanently removes it from the FlowWright Document Management System.
A typical workflow might look like this:

Once the document has been deleted, later workflow steps can:
- Generate audit reports
- Notify administrators
- Update repository statistics
- Synchronize external repositories
- Complete retention workflows
- Continue repository maintenance processes
The document must already exist within the FlowWright Document Management System before this step is executed.
Example:
Let’s build and execute the “DMSDeleteDocumentDef” example:
- Create a new process definition named “DMSDeleteDocumentDef” and open it in designer mode.
- Drag an “updateVariables, DMSDeleteDocument” step to the canvas.
- Connect the dots between the “Start” and other steps, as shown above.
- Define a variable or global to store the “Document ID”.
- On the DMS page, navigate to and select the Document shown in this example. Click the column selector and choose the “ID” column to show. Copy and paste the “Document ID” value to the clipboard.

- Click the "updateVariables" step to configure its "Required" properties. Provide a name for the step. Click the Save button. Note: Click the "AI Predict" button to have Copilot add new process steps that match your process description.

- Click the "updateVariables" step to configure its "Optional" properties. Provide a variable reference to hold the “Document ID” value. Copy-paste the value from the clipboard. Click the Save button.

- Click the "DMSDeleteDocument" step to configure its "Required" properties. Provide a name for the step. Provide a variable or global reference that holds the “Document ID”. Click the Save button. Note: Click the "AI Predict" button to have Copilot add new process steps that match your process description.

- The “Logging” setting configuration is necessary for documentation and also for measuring workflow progress and completion percentage. 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 it. When the workflow reaches the Delete Document step, FlowWright retrieves the specified document using the configured Document ID and attempts to permanently remove it from the repository. If the operation completes successfully, the workflow follows the True return path. If the document cannot be found, the executing user does not have permission to delete the document, the document is currently locked or checked out, or the deletion operation cannot be completed, the workflow follows the False return path. Click the process step to view its properties. The step should successfully delete the specified document and return True upon completion. Verify within the Document Management System that the document is no longer present in the repository.

- On the DMS page, select the folder to view the deleted document.

- On the DMS page, select the parent folder. Click the ellipsis button to access context features, then select the “View History” option.

- The “View History” pages show the message from the deleted document.

- Select the parent folder, then click View > Recycle Bin.

- The “DMS Recycle Bin” page displays the document.

- Select the document, then click the “Actions” menu to access the “Restore, Destroy, and Empty” features. The “Restore” feature restores the document to its previous state. The “Destroy” feature removes the item, and the “Empty” feature removes all items in the Recycle Bin.

Tips:
- Verify that the specified Document ID references an existing document.
- Ensure that the executing user has permission to delete documents from the repository.
- Confirm that the document is no longer required before permanently deleting it.
- Archive important documents before deletion when required by your organization's retention policy.
- Consider checking whether the document is checked out or referenced by other workflows before deleting it.
- Use the True and False return paths to implement appropriate success and error handling.
- Combine this step with Document Exists, Download Document, Archive Document, Get Document Link, or Generate Audit Report workflow steps to automate complete document retention and cleanup workflows.
Notes:
- The specified document must already exist in the FlowWright Document Management System.
- The executing user must have sufficient permissions to delete documents.
- Deleting a document permanently removes it from the repository.
- Any workflows or integrations that reference the deleted document may no longer function as expected.
- Documents that are checked out or protected by repository policies may not be eligible for deletion until those conditions are resolved.
- Invalid Document IDs or insufficient permissions may cause the step to return False.
- The workflow should include appropriate error handling for the False return path.
- Document deletion operations should be audited in accordance with your organization's document governance, security, and compliance policies.
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 (XML file) or Form Definition (HTML file) page.
Note: Verify and complete any missing configuration after importing the sample, including:
- Document ID mapping
- Workflow variable mappings
- DMS security permissions
- Repository retention policies
- Environment-specific settings
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.