# Class SerializedParameter OptimaJet.Workflow.Core.Model.SerializedParameter Represents a process parameter prepared for persistence, including its [SerializedParameter.Name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/), [SerializedParameter.SerializedValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/), and required [SerializedParameter.Operation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/). Namespace: [OptimaJet.Workflow.Core.Model](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/) ```csharp public sealed class SerializedParameter ``` ## Properties `public string Name { get; }` Gets the name of the process parameter represented by this instance. `public string? SerializedValue { get; }` Gets the serialized process parameter value to persist. `public SerializedParameter.PersistenceOperation Operation { get; }` Gets the [SerializedParameter.PersistenceOperation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter.PersistenceOperation/) to apply to the process parameter. ## Methods `public static SerializedParameter Create(ParameterDefinitionWithValue parameter)` Prepares `parameter` for persistence by producing its [SerializedParameter.SerializedValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/) and selecting its [SerializedParameter.Operation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/). ### Parameters | Name | Type | Description | | --- | --- | --- | | `parameter` | `ParameterDefinitionWithValue` | The [ParameterDefinitionWithValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ParameterDefinitionWithValue/) that represents the process parameter to prepare. | ### Returns | Type | Description | | --- | --- | | `SerializedParameter` | A [SerializedParameter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/) whose [SerializedParameter.Name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/), [SerializedParameter.SerializedValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/), and [SerializedParameter.Operation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter/) describe the required persistence change. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | `parameter` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | | `InvalidCastException` | [ParameterDefinitionWithValue.IsImplicit](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ParameterDefinitionWithValue/) is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) and [ParameterDefinitionWithValue.Value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ParameterDefinitionWithValue/) is not a [string](https://learn.microsoft.com/dotnet/api/system.string) or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | ### Remarks When [ParameterDefinitionWithValue.IsImplicit](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ParameterDefinitionWithValue/) is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), the value of [ParameterDefinitionWithValue.Value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ParameterDefinitionWithValue/) is used as a [string](https://learn.microsoft.com/dotnet/api/system.string) without serialization. Otherwise, the value is serialized by [ParametersSerializer.Serialize(object, Type)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/ParametersSerializer/). A [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) serialized value selects [SerializedParameter.PersistenceOperation.Delete](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter.PersistenceOperation/). For any other value, the method selects [SerializedParameter.PersistenceOperation.Insert](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter.PersistenceOperation/) when the source parameter is not marked as existing in the persistence store and [SerializedParameter.PersistenceOperation.Update](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter.PersistenceOperation/) when it is. ## Nested Types `public enum SerializedParameter.PersistenceOperation` Specifies the operation required to persist a process parameter value. [View SerializedParameter.PersistenceOperation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter.PersistenceOperation/) [Previous SchemeDefinition](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SchemeDefinition-T/) [Next SerializedParameter.PersistenceOperation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/SerializedParameter.PersistenceOperation/)