Class WorkflowApprovalHistory
OptimaJet.Workflow.SQLite.WorkflowApprovalHistory
Database object for workflow approval history operations.
Namespace: OptimaJet.Workflow.SQLite
public class WorkflowApprovalHistory : DbObject<ApprovalHistoryEntity>Inheritance
- Object
- DbObject<ApprovalHistoryEntity>
Constructors
public WorkflowApprovalHistory(string schemaName, int commandTimeout) #Initializes a new instance of WorkflowApprovalHistory.
Parameters
Name
Type
Description
schemaNameStringThe database schema name.
commandTimeoutInt32The command timeout in seconds.
Methods
public static ApprovalHistoryEntity ToDB(ApprovalHistoryItem historyItem) #Converts an ApprovalHistoryItem to a database entity.
Parameters
Name
Type
Description
historyItemApprovalHistoryItemThe approval history item to convert.
Returns
Type
Description
ApprovalHistoryEntityA new ApprovalHistoryEntity populated from the item.
public static ApprovalHistoryItem FromDB(ApprovalHistoryEntity historyEntity) #Converts a database entity to an ApprovalHistoryItem.
Parameters
Name
Type
Description
historyEntityApprovalHistoryEntityThe approval history entity to convert.
Returns
Type
Description
ApprovalHistoryItemA new ApprovalHistoryItem populated from the entity.
public Task<List<OutboxItem>> SelectOutboxByIdentityIdAsync(SqliteConnection connection, string identityId, Paging paging = null) #Selects outbox items for the specified identity with optional paging.
Parameters
Name
Type
Description
connectionSqliteConnectionThe SQLite connection.
identityIdStringThe identity identifier.
pagingPagingThe paging settings, or
null to return all items.Returns
Type
Description
Task<OutboxItem>A list of outbox items.
public Task<int> GetOutboxCountByIdentityIdAsync(SqliteConnection connection, string identityId) #Returns the number of outbox processes for the specified identity.
Parameters
Name
Type
Description
connectionSqliteConnectionThe SQLite connection.
identityIdStringThe identity identifier.
Returns
Type
Description
Task<Int32>The count of outbox processes.
public Task<int> DeleteByProcessIdAsync(SqliteConnection connection, Guid processId, SqliteTransaction transaction = null) #Deletes all approval history records for the specified process.
Parameters
Name
Type
Description
connectionSqliteConnectionThe SQLite connection.
processIdGuidThe process identifier.
transactionSqliteTransactionAn optional transaction.
Returns
Type
Description
Task<Int32>The number of rows affected.
public Task<List<ApprovalHistoryEntity>> SelectByProcessIdAsync(SqliteConnection connection, Guid processId) #Selects all approval history entities for the specified process.
Parameters
Name
Type
Description
connectionSqliteConnectionThe SQLite connection.
processIdGuidThe process identifier.
Returns
Type
Description
Task<ApprovalHistoryEntity>A list of approval history entities.