# Class WorkflowRuntime OptimaJet.Workflow.PostgreSQL.Models.WorkflowRuntime Namespace: [OptimaJet.Workflow.PostgreSQL.Models](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL.Models/) ```csharp public class WorkflowRuntime : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL/DbObject-TEntity/) - WorkflowRuntime Current type ## Constructors `public WorkflowRuntime(string schemaName, int commandTimeout)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | | | `commandTimeout` | `Int32` | | ## Methods `public Task UpdateStatusAsync(NpgsqlConnection connection, WorkflowRuntimeModel status, Guid oldLock)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `status` | `WorkflowRuntimeModel` | | | `oldLock` | `Guid` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task UpdateRestorerAsync(NpgsqlConnection connection, WorkflowRuntimeModel status, Guid oldLock)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `status` | `WorkflowRuntimeModel` | | | `oldLock` | `Guid` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task MultiServerRuntimesExistAsync(NpgsqlConnection connection)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task GetActiveMultiServerRuntimesCountAsync(NpgsqlConnection connection, string currentRuntimeId)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `currentRuntimeId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task GetWorkflowRuntimeStatusAsync(NpgsqlConnection connection, string runtimeId)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `runtimeId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SendRuntimeLastAliveSignalAsync(NpgsqlConnection connection, string runtimeId, DateTime time)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `runtimeId` | `String` | | | `time` | `DateTime` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task UpdateNextTimeAsync(NpgsqlConnection connection, string runtimeId, string nextTimeColumnName, DateTime time, NpgsqlTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `runtimeId` | `String` | | | `nextTimeColumnName` | `String` | | | `time` | `DateTime` | | | `transaction` | `NpgsqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task GetMaxNextTimeAsync(NpgsqlConnection connection, string runtimeId, string nextTimeColumnName)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `runtimeId` | `String` | | | `nextTimeColumnName` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous WorkflowForm](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL.Models/WorkflowForm/) [Next WorkflowSync](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL.Models/WorkflowSync/)