# Class WorkflowFormEntity OptimaJet.Workflow.Core.Entities.WorkflowFormEntity Represents the persisted data for a [WorkflowForm](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/WorkflowForm/). Namespace: [OptimaJet.Workflow.Core.Entities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/) ```csharp public class WorkflowFormEntity : IEntity ``` ## Type Hierarchy - WorkflowFormEntity Current type - Implemented interfaces - [IEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/IEntity/) ## Properties `public Guid Id { get; set; }` Gets or sets the identifier of the persisted workflow form version. `public string Name { get; set; }` Gets or sets the name that identifies the workflow form within its tenant scope. `public int Version { get; set; }` Gets or sets the version number of the workflow form. `public DateTime CreationDate { get; set; }` Gets or sets the date and time when the workflow form version was created. `public DateTime UpdatedDate { get; set; }` Gets or sets the date and time when the workflow form version was last updated. `public string Definition { get; set; }` Gets or sets the workflow form definition. `public int Lock { get; set; }` Gets or sets the optimistic concurrency value for the workflow form version. `public string? TenantId { get; set; }` Gets or sets the tenant identifier for the workflow form, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for a shared workflow form. ## 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 a supported public property declared by [WorkflowFormEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/). | ### Returns | Type | Description | | --- | --- | | `Object` | The value of the property selected by `key`. | ### Exceptions | Type | Description | | --- | --- | | `ColumnNotExistsException` | `key` does not match the name of 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 a supported public property declared by [WorkflowFormEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/). | | `value` | `Object` | The value to assign. A value for [WorkflowFormEntity.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/) must be a [Guid](https://learn.microsoft.com/dotnet/api/system.guid). Values for [WorkflowFormEntity.CreationDate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/) and [WorkflowFormEntity.UpdatedDate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/) must be a [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime). Values for [WorkflowFormEntity.Version](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/) and [WorkflowFormEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/) must be an [int](https://learn.microsoft.com/dotnet/api/system.int32) or [long](https://learn.microsoft.com/dotnet/api/system.int64). For the remaining properties, a value that is not a [string](https://learn.microsoft.com/dotnet/api/system.string) is assigned as [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | ### Exceptions | Type | Description | | --- | --- | | `ColumnNotExistsException` | `key` does not match the name of a supported property. | | `InvalidCastException` | `key` identifies [WorkflowFormEntity.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/), [WorkflowFormEntity.CreationDate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/), or [WorkflowFormEntity.UpdatedDate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/), and `value` is not [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) and has an incompatible type; or `key` identifies [WorkflowFormEntity.Version](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/) or [WorkflowFormEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/), and `value` is neither an [int](https://learn.microsoft.com/dotnet/api/system.int32) nor an [long](https://learn.microsoft.com/dotnet/api/system.int64). | | `NullReferenceException` | `key` identifies [WorkflowFormEntity.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/), [WorkflowFormEntity.CreationDate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/), or [WorkflowFormEntity.UpdatedDate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/), and `value` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | `public WorkflowForm ToModel()` Creates a [WorkflowForm](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/WorkflowForm/) with property values copied from this entity. ### Returns | Type | Description | | --- | --- | | `WorkflowForm` | The [WorkflowForm](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/WorkflowForm/) created from this entity. | [Previous SyncEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/) [Next ExecutionRequestParameters](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Execution/ExecutionRequestParameters/)