# Class WorkflowApprovalHistory OptimaJet.Workflow.SQLite.WorkflowApprovalHistory Database object for workflow approval history operations. Namespace: [OptimaJet.Workflow.SQLite](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/) ```csharp public class WorkflowApprovalHistory : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/DbObject-TEntity/) - WorkflowApprovalHistory Current type ## Constructors `public WorkflowApprovalHistory(string schemaName, int commandTimeout)` Initializes a new instance of [WorkflowApprovalHistory](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowApprovalHistory/). ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | The database schema name. | | `commandTimeout` | `Int32` | The command timeout in seconds. | ## Methods `public static ApprovalHistoryEntity ToDB(ApprovalHistoryItem historyItem)` Converts an ApprovalHistoryItem to a database entity. ### Parameters | Name | Type | Description | | --- | --- | --- | | `historyItem` | `ApprovalHistoryItem` | The approval history item to convert. | ### Returns | Type | Description | | --- | --- | | `ApprovalHistoryEntity` | A new ApprovalHistoryEntity populated from the item. | `public static ApprovalHistoryItem FromDB(ApprovalHistoryEntity historyEntity)` Converts a database entity to an ApprovalHistoryItem. ### Parameters | Name | Type | Description | | --- | --- | --- | | `historyEntity` | `ApprovalHistoryEntity` | The approval history entity to convert. | ### Returns | Type | Description | | --- | --- | | `ApprovalHistoryItem` | A new ApprovalHistoryItem populated from the entity. | `public Task> SelectOutboxByIdentityIdAsync(SqliteConnection connection, string identityId, Paging paging = null)` Selects outbox items for the specified identity with optional paging. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `identityId` | `String` | The identity identifier. | | `paging` | `Paging` | The paging settings, or `null` to return all items. | ### Returns | Type | Description | | --- | --- | | `Task` | A list of outbox items. | `public Task GetOutboxCountByIdentityIdAsync(SqliteConnection connection, string identityId)` Returns the number of outbox processes for the specified identity. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `identityId` | `String` | The identity identifier. | ### Returns | Type | Description | | --- | --- | | `Task` | The count of outbox processes. | `public Task DeleteByProcessIdAsync(SqliteConnection connection, Guid processId, SqliteTransaction transaction = null)` Deletes all approval history records for the specified process. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `processId` | `Guid` | The process identifier. | | `transaction` | `SqliteTransaction` | An optional transaction. | ### Returns | Type | Description | | --- | --- | | `Task` | The number of rows affected. | `public Task> SelectByProcessIdAsync(SqliteConnection connection, Guid processId)` Selects all approval history entities for the specified process. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `processId` | `Guid` | The process identifier. | ### Returns | Type | Description | | --- | --- | | `Task` | A list of approval history entities. | [Previous SqliteProvider](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/SqliteProvider/) [Next WorkflowGlobalParameter](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowGlobalParameter/)