# Class WorkflowProcessInstanceStatus OptimaJet.Workflow.SQLite.WorkflowProcessInstanceStatus Database object for workflow process instance status operations. Namespace: [OptimaJet.Workflow.SQLite](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/) ```csharp public class WorkflowProcessInstanceStatus : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/DbObject-TEntity/) - WorkflowProcessInstanceStatus Current type ## Constructors `public WorkflowProcessInstanceStatus(string schemaName, int commandTimeout)` Initializes a new instance of [WorkflowProcessInstanceStatus](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowProcessInstanceStatus/). ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | The database schema name. | | `commandTimeout` | `Int32` | The command timeout in seconds. | ## Methods `public Task> GetProcessesByStatusAsync(SqliteConnection connection, byte status, string runtimeId = null)` Returns identifiers of processes with the specified status, optionally filtered by runtime. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `status` | `Byte` | The process status byte value. | | `runtimeId` | `String` | The runtime identifier to filter by, or `null` for all runtimes. | ### Returns | Type | Description | | --- | --- | | `Task` | A list of process identifiers. | `public Task ChangeStatusAsync(SqliteConnection connection, ProcessInstanceStatusEntity status, Guid oldLock)` Changes the status of a process instance using optimistic locking. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `status` | `ProcessInstanceStatusEntity` | The status entity with the new status values. | | `oldLock` | `Guid` | The current lock value for optimistic concurrency. | ### Returns | Type | Description | | --- | --- | | `Task` | The number of rows affected. | [Previous WorkflowProcessInstancePersistence](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowProcessInstancePersistence/) [Next WorkflowProcessScheme](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowProcessScheme/)