# Class ProcessInstanceItem OptimaJet.Workflow.Core.Persistence.ProcessInstanceItem Represents a persisted process instance record returned by [IPersistenceProvider.GetProcessInstancesAsync(List<(string parameterName, SortDirection sortDirection)>, Paging)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/IPersistenceProvider/). Namespace: [OptimaJet.Workflow.Core.Persistence](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/) ```csharp public class ProcessInstanceItem ``` ## Properties `public string ActivityName { get; set; }` Gets or sets the current activity name recorded for the process instance, corresponding to [ProcessInstance.CurrentActivityName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public Guid Id { get; set; }` Gets or sets the process instance identifier exposed by [ProcessInstance.ProcessId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public string PreviousActivity { get; set; }` Gets or sets the source activity name stored in [ProcessInstance.PreviousActivityName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/) for the most recently executed transition. `public string PreviousActivityForDirect { get; set; }` Gets or sets the source activity name stored in [ProcessInstance.PreviousActivityForDirectName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/) for the most recently executed [TransitionClassifier.Direct](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) transition. `public string PreviousActivityForReverse { get; set; }` Gets or sets the source activity name stored in [ProcessInstance.PreviousActivityForReverseName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/) for the most recently executed [TransitionClassifier.Reverse](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) transition. `public string PreviousState { get; set; }` Gets or sets the business state from [TransitionDefinition.From](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionDefinition/) for the most recently executed transition whose source activity has a nonempty [ActivityDefinition.State](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActivityDefinition/). `public string PreviousStateForDirect { get; set; }` Gets or sets the business state from [TransitionDefinition.From](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionDefinition/) for the most recently executed [TransitionClassifier.Direct](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) transition whose source activity has a nonempty [ActivityDefinition.State](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActivityDefinition/). `public string PreviousStateForReverse { get; set; }` Gets or sets the business state from [TransitionDefinition.From](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionDefinition/) for the most recently executed [TransitionClassifier.Reverse](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) transition whose source activity has a nonempty [ActivityDefinition.State](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActivityDefinition/). `public Guid? SchemeId { get; set; }` Gets or sets the identifier of the built process scheme version used by the process instance, as exposed by [ProcessInstance.SchemeId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public string StateName { get; set; }` Gets or sets the current business state name exposed by [ProcessInstance.CurrentState](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public Guid? ParentProcessId { get; set; }` Gets or sets the identifier of the immediate parent process instance, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for a top-level process instance, as exposed by [ProcessInstance.ParentProcessId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public Guid RootProcessId { get; set; }` Gets or sets the identifier of the top-level root process instance, as exposed by [ProcessInstance.RootProcessId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public string TenantId { get; set; }` Gets or sets the tenant identifier assigned to the process instance, as exposed by [ProcessInstance.TenantId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public string StartingTransition { get; set; }` Gets or sets the name of the [TransitionDefinition](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionDefinition/) that started the subprocess, as recorded by [ProcessDefinition.StartingTransition](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessDefinition/). `public string SubprocessName { get; set; }` Gets or sets the name assigned to the subprocess by [TransitionDefinition.SubprocessName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionDefinition/). `public DateTime CreationDate { get; set; }` Gets or sets the date and time when the process instance was created, as exposed by [ProcessInstance.CreationDate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public DateTime? LastTransitionDate { get; set; }` Gets or sets the date and time of the most recent transition execution, as exposed by [ProcessInstance.LastTransitionDate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). `public string CalendarName { get; set; }` Gets or sets the work calendar name assigned to the process instance, as exposed by [ProcessInstance.CalendarName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). [Previous PersistenceProviderOptions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/PersistenceProviderOptions/) [Next ProcessStatus](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/ProcessStatus/)