# Class WorkflowProcessInstance OptimaJet.Workflow.SQLite.WorkflowProcessInstance Database object for workflow process instance operations. Namespace: [OptimaJet.Workflow.SQLite](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/) ```csharp public class WorkflowProcessInstance : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/DbObject-TEntity/) - WorkflowProcessInstance Current type ## Constructors `public WorkflowProcessInstance(string schemaName, int commandTimeout)` Initializes a new instance of [WorkflowProcessInstance](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowProcessInstance/). ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | The database schema name. | | `commandTimeout` | `Int32` | The command timeout in seconds. | ## Methods `public Task GetInstancesAsync(SqliteConnection connection, IEnumerable ids)` Selects process instances by a collection of identifiers. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `ids` | `IEnumerable` | The process identifiers to select. | ### Returns | Type | Description | | --- | --- | | `Task` | An array of matching process instance entities. | `public Task IsProcessExistsAsync(SqliteConnection connection, Guid processId, string tenantId)` Checks whether a process with the specified identifier exists in the given tenant scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `processId` | `Guid` | The process identifier. | | `tenantId` | `String` | The tenant identifier, or `null` for shared processes. | ### Returns | Type | Description | | --- | --- | | `Task` | `true` if the process exists; otherwise, `false`. | [Previous WorkflowInbox](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowInbox/) [Next WorkflowProcessInstancePersistence](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowProcessInstancePersistence/)