Class WorkflowInbox
OptimaJet.Workflow.SQLite.WorkflowInbox
Database object for workflow inbox operations.
Namespace: OptimaJet.Workflow.SQLite
public class WorkflowInbox : DbObject<InboxEntity>Inheritance
- Object
- DbObject<InboxEntity>
Constructors
public WorkflowInbox(string schemaName, int commandTimeout) #Initializes a new instance of WorkflowInbox.
Parameters
Name
Type
Description
schemaNameStringThe database schema name.
commandTimeoutInt32The command timeout in seconds.
Methods
public static InboxEntity ToDB(InboxItem inboxItem) #Converts an InboxItem to a database entity.
Parameters
Name
Type
Description
inboxItemInboxItemThe inbox item to convert.
Returns
Type
Description
InboxEntityA new InboxEntity populated from the item.
public static Task<List<InboxItem>> FromDB(WorkflowRuntime runtime, InboxEntity[] inboxItems, CultureInfo culture) #Converts an array of database entities to InboxItem objects, resolving available commands with localization.
Parameters
Name
Type
Description
runtimeWorkflowRuntimeThe workflow runtime used to resolve process instances.
inboxItemsInboxEntity[]The inbox entities to convert.
cultureCultureInfoThe culture for command name localization.
Returns
Type
Description
Task<InboxItem>A list of inbox items.
public Task<int> DeleteByProcessIdAsync(SqliteConnection connection, Guid processId, SqliteTransaction transaction = null) #Deletes all inbox 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<InboxEntity[]> SelectByProcessIdAsync(SqliteConnection connection, Guid processId) #Selects all inbox entities for the specified process.
Parameters
Name
Type
Description
connectionSqliteConnectionThe SQLite connection.
processIdGuidThe process identifier.
Returns
Type
Description
Task<InboxEntity[]>An array of inbox entities.