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