# Class WorkflowScheme OptimaJet.Workflow.PostgreSQL.WorkflowScheme Namespace: [OptimaJet.Workflow.PostgreSQL](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL/) ```csharp public class WorkflowScheme : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL/DbObject-TEntity/) - WorkflowScheme Current type ## Constructors `public WorkflowScheme(string schemaName, int commandTimeout)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | | | `commandTimeout` | `Int32` | | ## Methods `public Task SelectByCodeAsync(NpgsqlConnection connection, string code, string tenantId)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `code` | `String` | | | `tenantId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectByCodeExactAsync(NpgsqlConnection connection, string code, string tenantId)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `code` | `String` | | | `tenantId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public override Task UpsertAsync(NpgsqlConnection connection, SchemeEntity entity, NpgsqlTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `entity` | `SchemeEntity` | | | `transaction` | `NpgsqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectAllWorkflowSchemesWithPagingAsync(NpgsqlConnection connection, List<(string parameterName, SortDirection sortDirection)> orderParameters, Paging paging)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `orderParameters` | `List` | | | `paging` | `Paging` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task> GetInlinedSchemeCodesAsync(NpgsqlConnection connection, string tenantId = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `tenantId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task> GetRelatedSchemeCodesAsync(NpgsqlConnection connection, string schemeCode, string tenantId = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `schemeCode` | `String` | | | `tenantId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task> GetSchemeCodesByTagsAsync(NpgsqlConnection connection, string tenantId, IEnumerable tags)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `tenantId` | `String` | | | `tags` | `IEnumerable` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task AddSchemeTagsAsync(NpgsqlConnection connection, string schemeCode, string tenantId, IEnumerable tags, IWorkflowBuilder builder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `schemeCode` | `String` | | | `tenantId` | `String` | | | `tags` | `IEnumerable` | | | `builder` | `IWorkflowBuilder` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task RemoveSchemeTagsAsync(NpgsqlConnection connection, string schemeCode, string tenantId, IEnumerable tags, IWorkflowBuilder builder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `schemeCode` | `String` | | | `tenantId` | `String` | | | `tags` | `IEnumerable` | | | `builder` | `IWorkflowBuilder` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SetSchemeTagsAsync(NpgsqlConnection connection, string schemeCode, string tenantId, IEnumerable tags, IWorkflowBuilder builder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `schemeCode` | `String` | | | `tenantId` | `String` | | | `tags` | `IEnumerable` | | | `builder` | `IWorkflowBuilder` | | ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous WorkflowProcessTransitionHistory](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL/WorkflowProcessTransitionHistory/) [Next Migration10Initial](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL.Migrations/Migration10Initial/)