# Interface IWorkflowTenantRegistryLifecycle OptimaJet.Workflow.Api.IWorkflowTenantRegistryLifecycle Controls the host-owned lifecycle of the workflow tenant registry. Namespace: [OptimaJet.Workflow.Api](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/) ```csharp public interface IWorkflowTenantRegistryLifecycle ``` ## Methods `Task StartAsync(IEnumerable options, CancellationToken cancellationToken = default)` Starts the tenant registry and registers static tenants from the provided creation options. ### Parameters | Name | Type | Description | | --- | --- | --- | | `options` | `IEnumerable` | The static tenant creation options configured for the host. | | `cancellationToken` | `CancellationToken` | The cancellation token for the start operation. | ### Returns | Type | Description | | --- | --- | | `Task` | | `Task StopAsync(CancellationToken cancellationToken)` Stops the tenant registry and gracefully shuts down registry-owned tenants. Retries shutdowns that failed during an earlier snapshot cleanup or stop attempt; their tenant id and workflow runtime reservations are retained until a retry succeeds. ### Parameters | Name | Type | Description | | --- | --- | --- | | `cancellationToken` | `CancellationToken` | The cancellation token for the stop operation. | ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous IWorkflowTenantRegistry](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/IWorkflowTenantRegistry/) [Next IWorkflowTenantSnapshot](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/IWorkflowTenantSnapshot/)