RemoveTenant Step

Use this feature to remove a selected FlowWright tenant and delete its associated database.

Last published at: September 30th, 2026

Description:

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 removes the selected tenant and deletes its 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 intended for workflows that need to remove a selected tenant through a Tenant Manager connection.

A typical workflow pattern is:

Identify Tenant → Validate Removal → Remove Tenant → Continue Process

The workflow supplies the Tenant Manager connection and the tenant name or ID to the step. Both inputs are required.

Because the operation removes the selected tenant and deletes its database, place the step only after any required validation, approval, backup, or other prerequisite activities are complete.

A typical administrative workflow might be:

Tenant Decommission Request → Approval → Validation → Remove Tenant → Completion

The True and False return paths can then be connected to appropriate downstream processing.

 

Typical Workflow Suggestions:

Remove a Decommissioned Tenant

Use the step when an approved tenant decommissioning process needs to remove a tenant.

Example:

Tenant Decommission Request → Approval → Remove Tenant → Complete Request

Inputs:

Tenant Manager Connection: TenantManagerConnection
Tenant name or id: CustomerTenant01
The workflow can use the tenant name or ID to identify the tenant to remove.

 

Remove a Tenant After an Approval Process

Use the step after an explicit approval activity has completed.

Example:

Submit Removal Request → Manager Approval → Remove Tenant → Record Completion

This approach places the destructive tenant operation after the approval stage rather than allowing it to occur immediately after a request is submitted.

 

Remove a Tenant During an Administrative Cleanup Workflow

Use the step as part of a controlled tenant-cleanup process.

Example:

Identify Inactive Tenant → Validate Tenant → Remove Tenant → Update Cleanup Status

The tnconnection input identifies the Tenant Manager connection, while tnnameid identifies the tenant to remove.

 

Remove a Tenant After Pre-Removal Validation

Use the step after workflow activities have confirmed that the selected tenant is eligible for removal.

Example:

Tenant Validation → Confirm Removal Criteria → Remove Tenant → Completion

This pattern provides a dedicated validation stage before the destructive operation.

 

Handle Tenant Removal Success or Failure

Use the True and False paths to separate successful tenant removal from an alternative processing path.

Example:

Prepare Tenant Removal → Remove Tenant

                 +---- True ----> Record Successful Removal
                 |
Remove Tenant ---+
                 |
                 +---- False ---> Handle Removal Failure
The step provides both True and False return paths, allowing the workflow to branch after the operation.

 

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. 
  • Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
  • 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. Configure 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.

 

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.