# Class SetStateParams OptimaJet.Workflow.Core.Runtime.SetStateParams Provides parameters for setting a process state. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public class SetStateParams ``` ## Constructors `public SetStateParams(Guid processId, string stateName)` Initializes a new instance of the [SetStateParams](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/SetStateParams/) class. ### Parameters | Name | Type | Description | | --- | --- | --- | | `processId` | `Guid` | The identifier of the process instance. | | `stateName` | `String` | The name of the state to set. | ## Properties `public Guid ProcessId { get; set; }` Gets or sets the identifier of the process instance. `public string IdentityId { get; set; }` Gets or sets the workflow participant identity of the executor that performs the operation. `public string ImpersonatedIdentityId { get; set; }` Gets or sets the workflow participant identity on whose behalf the operation is performed. `public string StateName { get; set; }` Gets or sets the name of the state to set. `public bool PreventExecution { get; set; }` Gets or sets whether to set the state without executing transition actions. `public IDictionary ProcessParameters { get; set; }` Gets or sets parameters passed to the process during the state change. `public List Persist { get; set; }` Gets or sets the names of parameters in [SetStateParams.ProcessParameters](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/SetStateParams/) that should be persisted. ## Methods `public SetStateParams AddPersistentParameter(string name, object value)` Adds a process parameter and marks it as persistent. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | The parameter name. | | `value` | `Object` | The value to assign to the parameter. | ### Returns | Type | Description | | --- | --- | | `SetStateParams` | The same [SetStateParams](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/SetStateParams/) instance. | `public SetStateParams AddTemporaryParameter(string name, object value)` Adds a process parameter that is not marked as persistent. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | The parameter name. | | `value` | `Object` | The value to assign to the parameter. | ### Returns | Type | Description | | --- | --- | | `SetStateParams` | The same [SetStateParams](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/SetStateParams/) instance. | [Previous SchemaWasChangedEventArgs](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/SchemaWasChangedEventArgs/) [Next StartingTransitionNotFoundEventArgs](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/StartingTransitionNotFoundEventArgs/)