Description:
The Remove Tenant workflow step belongs to the Tenants category in FlowWright. Its internal name is clsremovetenant, its label is Removes the selected tenant and deletes the database, and its display name is Remove Tenant. The step uses the FlowWright.Workflow.ClsRemoveTenant namespace and FlowWright.Workflow.dll. It is defined as a Process step with two input connections and two output connections.
The Remove Tenant workflow step uses a configured Tenant Manager connection and a tenant name or ID to identify the tenant to remove. The step is specifically defined to remove the selected tenant and delete the database.
The step supports:
- Selecting a Tenant Manager connection
- Identifying a tenant by name or ID
- Removing the selected tenant
- Deleting the tenant's database
- True/False workflow branching
This step can be used for:
- Tenant deprovisioning
- Tenant lifecycle management
- Removing obsolete tenants
- Automated environment cleanup
- Tenant cancellation workflows
- Cleanup after temporary tenant creation
- Administrative tenant-management processes
Important: Because this step is defined to remove the selected tenant and delete the database, it should be used only when permanent tenant removal is intended. Verify the tenant identification and Tenant Manager connection carefully before execution.
Inputs
- Select Tenant manager connection – Selects the Tenant Manager connection used to perform the tenant operation.
- Tenant name or ID – Specifies the tenant to be removed by name or ID.
Returns
- True – Step executed successfully.
- False – Step failed to execute.
Usage:
The Remove Tenant step is typically used near the end of a tenant lifecycle when a tenant is no longer required.
The workflow can dynamically determine the tenant to remove using:
- Workflow Variables
- Global variables
- Form values
- Previous workflow outputs
- Tenant administration information
- Data retrieved from external systems
A typical tenant deprovisioning workflow could be structured as:

Because the operation removes the tenant and deletes the database, a confirmation or authorization stage is recommended before this step in workflows where accidental removal must be prevented.
Example:
Let’s build and execute the “clsRemoveTenantDef” example.
- Create a new process definition named “clsRemoveTenantDef” and open it in designer mode.
- Drag a "clsRemoveTenant" step to the canvas.
- Connect the dots between the “Start” and "clsRemoveTenant" steps, as shown above.
- Click the "clsRemoveTenant" step to configure its “Required” properties. Provide a name for the step. Select the connection string and enter the Tenant Name or GUID value. Click the Save button. Note: Click the "AI Predict" button to have the Copilot 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.

- Save the Process Definition. Create a new Process Instance and execute it. When the workflow reaches the Remove Tenant step, the configured Tenant Manager connection is used to remove the tenant specified by the supplied tenant name or ID. The selected tenant is removed, and its database is deleted as defined by the step.
Tips:
- Verify the Tenant Manager connection carefully before execution.
- Confirm the tenant name or ID identifies the intended tenant.
- Treat this step as a destructive operation because its definition explicitly states that it removes the selected tenant and deletes the database.
- Add an authorization or confirmation step before tenant removal where appropriate.
- Use a clearly identified tenant Variable/Global when the tenant is selected dynamically.
- Test tenant-removal workflows in a non-production environment before deploying them to production.
- Configure the False path so that failed removals do not silently appear successful.
- Consider placing required business-level archiving or data-export operations before tenant removal.
- Verify the selected environment before executing a workflow containing this step.
- Avoid placing this step in a workflow where the tenant could be selected from uncontrolled or unvalidated input.
- Use clear process and step names so that the destructive nature of the operation is obvious to workflow administrators.
Notes:
- Category: Tenants.
-
Internal name:
clsremovetenant. - Label: Removes the selected tenant and deletes the database.
- Display name: Remove Tenant.
-
Namespace:
FlowWright.Workflow.ClsRemoveTenant. -
DLL:
FlowWright.Workflow.dll. - Step definition type: Process.
- Input connections: 2.
- Output connections: 2.
- Tenant Manager connection: Required.
- Tenant name or ID: Required.
- Returns: True and False.
Definition Sample:
You may download the sample definition(s) from the link provided and later import them into the FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Verify and complete any missing configuration after importing the sample, including:
- Tenant Manager connection
- Tenant name or ID
- Environment-specific settings
- Workflow connections
- Authorization and approval requirements
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.