# Class WorkflowProcessInstancePersistence OptimaJet.Workflow.PostgreSQL.WorkflowProcessInstancePersistence Namespace: [OptimaJet.Workflow.PostgreSQL](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL/) ```csharp public class WorkflowProcessInstancePersistence : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL/DbObject-TEntity/) - WorkflowProcessInstancePersistence Current type ## Constructors `public WorkflowProcessInstancePersistence(string schemaName, int commandTimeout)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | | | `commandTimeout` | `Int32` | | ## Methods `public Task SelectByProcessIdAsync(NpgsqlConnection connection, Guid processId)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `processId` | `Guid` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectByNameAsync(NpgsqlConnection connection, Guid processId, string parameterName)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `processId` | `Guid` | | | `parameterName` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task DeleteByProcessIdAsync(NpgsqlConnection connection, Guid processId, NpgsqlTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `processId` | `Guid` | | | `transaction` | `NpgsqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task DeleteByNameAsync(NpgsqlConnection connection, Guid processId, string parameterName, NpgsqlTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `processId` | `Guid` | | | `parameterName` | `String` | | | `transaction` | `NpgsqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task UpsertAsync(NpgsqlConnection connection, ProcessInstancePersistenceEntity entity, bool preferUpdateFirst, NpgsqlTransaction transaction)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `NpgsqlConnection` | | | `entity` | `ProcessInstancePersistenceEntity` | | | `preferUpdateFirst` | `Boolean` | | | `transaction` | `NpgsqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous WorkflowProcessInstance](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL/WorkflowProcessInstance/) [Next WorkflowProcessInstanceStatus](https://api.workflowengine.io/postgresql/OptimaJet.Workflow.PostgreSQL/WorkflowProcessInstanceStatus/)