# Class ProcessInstancePersistenceEntity OptimaJet.Workflow.Core.Entities.ProcessInstancePersistenceEntity Represents a persistence record containing the serialized value of a process instance parameter. Namespace: [OptimaJet.Workflow.Core.Entities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/) ```csharp public class ProcessInstancePersistenceEntity : IEntity ``` ## Type Hierarchy - ProcessInstancePersistenceEntity 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 persistence record. `public Guid ProcessId { get; set; }` Gets or sets the identifier of the process instance that owns the persisted parameter. `public string ParameterName { get; set; }` Gets or sets the name of the persisted parameter. `public string Value { get; set; }` Gets or sets the serialized value of the persisted parameter. `public string TenantId { get; set; }` Gets or sets the tenant identifier associated with the process instance, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for a tenantless process. ## 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 [ProcessInstancePersistenceEntity.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), [ProcessInstancePersistenceEntity.ProcessId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), [ProcessInstancePersistenceEntity.ParameterName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), [ProcessInstancePersistenceEntity.Value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), or [ProcessInstancePersistenceEntity.TenantId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/). | ### 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 [ProcessInstancePersistenceEntity.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), [ProcessInstancePersistenceEntity.ProcessId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), [ProcessInstancePersistenceEntity.ParameterName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), [ProcessInstancePersistenceEntity.Value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), or [ProcessInstancePersistenceEntity.TenantId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/). | | `value` | `Object` | The value to assign. Values for [ProcessInstancePersistenceEntity.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/) and [ProcessInstancePersistenceEntity.ProcessId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/) must be a [Guid](https://learn.microsoft.com/dotnet/api/system.guid); a value for [ProcessInstancePersistenceEntity.ParameterName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), [ProcessInstancePersistenceEntity.Value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), or [ProcessInstancePersistenceEntity.TenantId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/) 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 [ProcessInstancePersistenceEntity.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/) or [ProcessInstancePersistenceEntity.ProcessId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), and `value` is not [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) and is not a [Guid](https://learn.microsoft.com/dotnet/api/system.guid). | | `NullReferenceException` | `key` identifies [ProcessInstancePersistenceEntity.Id](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/) or [ProcessInstancePersistenceEntity.ProcessId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstancePersistenceEntity/), and `value` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | [Previous ProcessInstanceEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstanceEntity/) [Next ProcessInstanceStatusEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/ProcessInstanceStatusEntity/)