Workflow Engine .NET

Assembly: OptimaJet.Workflow.SQLite

Class WorkflowApprovalHistory

OptimaJet.Workflow.SQLite.WorkflowApprovalHistory

Database object for workflow approval history operations.

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
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<List<OutboxItem>> 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<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
connection
SqliteConnection
The SQLite connection.
identityId
String
The 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
connection
SqliteConnection
The SQLite connection.
processId
Guid
The process identifier.
transaction
SqliteTransaction
An 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
connection
SqliteConnection
The SQLite connection.
processId
Guid
The process identifier.

Returns

Type
Description
Task<ApprovalHistoryEntity>
A list of approval history entities.