# Class WorkflowTenant OptimaJet.Workflow.Api.WorkflowTenant A basic implementation of [IWorkflowTenant](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/IWorkflowTenant/). Namespace: [OptimaJet.Workflow.Api](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/) ```csharp public class WorkflowTenant : IWorkflowTenant ``` ## Type Hierarchy - WorkflowTenant Current type - Implemented interfaces - [IWorkflowTenant](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/IWorkflowTenant/) ## Constructors `public WorkflowTenant(IEnumerable ids, WorkflowRuntime runtime, IDataProvider dataProvider, WorkflowTenantLifecycleOwnership lifecycleOwnership)` Initializes a new instance of the [WorkflowTenant](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/WorkflowTenant/) class with the specified ids, runtime, and data provider options. ### Parameters | Name | Type | Description | | --- | --- | --- | | `ids` | `IEnumerable` | The logical tenant ids that map to this tenant instance. | | `runtime` | `WorkflowRuntime` | The workflow runtime instance for this tenant. | | `dataProvider` | `IDataProvider` | The data provider for this tenant. | | `lifecycleOwnership` | `WorkflowTenantLifecycleOwnership` | The lifecycle ownership of the tenant. | ## Properties `public IReadOnlyCollection Ids { get; }` All logical tenant ids that map to this tenant instance. `public WorkflowRuntime WorkflowRuntime { get; }` The workflow runtime instance for this tenant. `public IDataProvider DataProvider { get; }` The data provider for this tenant. `public WorkflowTenantLifecycleOwnership LifecycleOwnership { get; }` Lifecycle ownership of the tenant, indicating whether the tenant is managed by the workflow engine or externally. ## Methods `public Task StartAsync()` Starts the tenant lifecycle before the tenant is published in the tenant registry. ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task ShutdownAsync()` Gracefully shuts down the tenant after it is removed from the tenant registry and no active snapshot uses it. ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous WorkflowApiOperationId](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/WorkflowApiOperationId/) [Next WorkflowTenantLifecycleOwnership](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api/WorkflowTenantLifecycleOwnership/)