# Class RuntimeEntity OptimaJet.Workflow.Core.Entities.RuntimeEntity Represents the persistence entity that stores status, liveness, restoration, and distributed timer scheduling data for a workflow runtime. Namespace: [OptimaJet.Workflow.Core.Entities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/) ```csharp public class RuntimeEntity : IEntity ``` ## Type Hierarchy - RuntimeEntity Current type - Implemented interfaces - [IEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/IEntity/) ## Properties `public string RuntimeId { get; set; }` Gets or sets the [WorkflowRuntime.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) value of the represented workflow runtime. `public Guid Lock { get; set; }` Gets or sets the concurrency token used to guard updates to [RuntimeEntity.Status](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/) and [RuntimeEntity.RestorerId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/). `public RuntimeStatus Status { get; set; }` Gets or sets the persisted [RuntimeStatus](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/RuntimeStatus/) value of the workflow runtime. `public string RestorerId { get; set; }` Gets or sets the [WorkflowRuntime.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) value of the workflow runtime assigned to restore the represented runtime. `public DateTime? NextTimerTime { get; set; }` Gets or sets the next polling time allocated to the workflow runtime for [TimerCategory.Timer](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Timers/TimerCategory/) processing. `public DateTime? NextServiceTimerTime { get; set; }` Gets or sets the next polling time allocated to the workflow runtime for [TimerCategory.ServiceTimer](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Timers/TimerCategory/) processing. `public DateTime? LastAliveSignal { get; set; }` Gets or sets the date and time of the most recent alive signal recorded for the workflow runtime. ## Methods `public object GetValue(string key)` Gets the value of the property identified by `key`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `key` | `String` | The case-sensitive name of [RuntimeEntity.RuntimeId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.Status](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.RestorerId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.NextTimerTime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.NextServiceTimerTime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), or [RuntimeEntity.LastAliveSignal](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/). | ### Returns | Type | Description | | --- | --- | | `Object` | The value of the property identified by `key`. | ### Exceptions | Type | Description | | --- | --- | | `ColumnNotExistsException` | `key` does not identify a supported property. | `public void SetValue(string key, object value)` Sets the value of the property identified by `key`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `key` | `String` | The case-sensitive name of [RuntimeEntity.RuntimeId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.Status](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.RestorerId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.NextTimerTime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), [RuntimeEntity.NextServiceTimerTime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), or [RuntimeEntity.LastAliveSignal](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/). | | `value` | `Object` | The value to assign. [RuntimeEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/) requires a [Guid](https://learn.microsoft.com/dotnet/api/system.guid), and [RuntimeEntity.Status](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/) requires a [RuntimeStatus](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/RuntimeStatus/). For the remaining properties, an incompatible value is assigned as [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | ### Exceptions | Type | Description | | --- | --- | | `ColumnNotExistsException` | `key` does not identify a supported property. | | `InvalidCastException` | `key` identifies [RuntimeEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/) or [RuntimeEntity.Status](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), and `value` is not [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) and has an incompatible type. | | `NullReferenceException` | `key` identifies [RuntimeEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/) or [RuntimeEntity.Status](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/RuntimeEntity/), and `value` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | [Previous ProcessTransitionHistoryEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessTransitionHistoryEntity/) [Next SchemeEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SchemeEntity/)