Interface IPersistenceProvider
Interface of a persistence provider, which provide storing of process's instance specific parameters and global parameters
Inherited Members
IApprovalProvider.DropWorkflowInboxAsync(Guid)
IApprovalProvider.InsertInboxAsync(List<InboxItem>)
IApprovalProvider.GetInboxCountByProcessIdAsync(Guid)
IApprovalProvider.GetInboxCountByIdentityIdAsync(string)
IApprovalProvider.GetInboxByProcessIdAsync(Guid, Paging, CultureInfo)
IApprovalProvider.GetInboxByIdentityIdAsync(string, Paging, CultureInfo)
IApprovalProvider.FillApprovalHistoryAsync(ApprovalHistoryItem)
IApprovalProvider.DropEmptyApprovalHistoryAsync(Guid)
IApprovalProvider.DropApprovalHistoryByProcessIdAsync(Guid)
IApprovalProvider.DropApprovalHistoryByIdentityIdAsync(string)
IApprovalProvider.GetApprovalHistoryCountByProcessIdAsync(Guid)
IApprovalProvider.GetApprovalHistoryCountByIdentityIdAsync(string)
IApprovalProvider.GetApprovalHistoryByProcessIdAsync(Guid, Paging)
IApprovalProvider.GetApprovalHistoryByIdentityIdAsync(string, Paging)
IApprovalProvider.GetOutboxCountByIdentityIdAsync(string)
IApprovalProvider.GetOutboxByIdentityIdAsync(string, Paging)
IAssignmentProvider.DeleteAssignmentAsync(Guid)
IAssignmentProvider.GetAssignmentsAsync(AssignmentFilter, List<(string parameterName, SortDirection sortDirection)>, Paging)
IAssignmentProvider.GetAssignmentCountAsync(AssignmentFilter)
IAssignmentProvider.CreateAssignmentAsync(Guid, AssignmentCreationForm)
IAssignmentProvider.GetAssignmentAsync(Guid)
IAssignmentProvider.UpdateAssignmentAsync(Assignment)
Namespace: OptimaJet.Workflow.Core.Persistence
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic interface IPersistenceProvider : IApprovalProvider, IAssignmentProvider
Methods
Init(WorkflowRuntime)
Init the provider
Declarationvoid Init(WorkflowRuntime runtime)
ParametersType | Name | Description |
---|
WorkflowRuntime | runtime | Workflow runtime instance which owned the provider |
InitializeProcessAsync(ProcessInstance)
Initialize a process instance in persistence store
DeclarationTask InitializeProcessAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsFillProcessParametersAsync(ProcessInstance)
Fills system ParameterPurpose.System and persisted ParameterPurpose.Persistence parameters of the process
DeclarationTask FillProcessParametersAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsFillPersistedProcessParametersAsync(ProcessInstance)
Fills persisted ParameterPurpose.Persistence parameters of the process
DeclarationTask FillPersistedProcessParametersAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsFillPersistedProcessParameterAsync(ProcessInstance, string)
Fills persisted ParameterPurpose.Persistence parameter of the process
DeclarationTask FillPersistedProcessParameterAsync(ProcessInstance processInstance, string parameterName)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
string | parameterName | |
ReturnsFillSystemProcessParametersAsync(ProcessInstance)
Fills system ParameterPurpose.System parameters of the process
DeclarationTask FillSystemProcessParametersAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsSavePersistenceParametersAsync(ProcessInstance)
Saves persisted ParameterPurpose.Persistence parameters of the process to store
DeclarationTask SavePersistenceParametersAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsSavePersistenceParameterAsync(ProcessInstance, string)
Save persisted ParameterPurpose.Persistence parameter of the process to store
DeclarationTask SavePersistenceParameterAsync(ProcessInstance processInstance, string parameterName)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
string | parameterName | Name of parameter for save |
ReturnsRemoveParameterAsync(ProcessInstance, string)
Remove persisted ParameterPurpose.Persistence parameter of the process from store
DeclarationTask RemoveParameterAsync(ProcessInstance processInstance, string parameterName)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
string | parameterName | Name of parameter for save |
ReturnsSetWorkflowInitializedAsync(ProcessInstance)
Set process instance status to ProcessStatus.Initialized
DeclarationTask SetWorkflowInitializedAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsSetWorkflowIdledAsync(ProcessInstance)
Set process instance status to ProcessStatus.Idled
DeclarationTask SetWorkflowIdledAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsSetWorkflowRunningAsync(ProcessInstance)
Set process instance status to ProcessStatus.Running
DeclarationTask SetWorkflowRunningAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsSetWorkflowFinalizedAsync(ProcessInstance)
Set process instance status to ProcessStatus.Finalized
DeclarationTask SetWorkflowFinalizedAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsSetProcessStatusAsync(Guid, ProcessStatus)
Set process instance status to newStatus
DeclarationTask SetProcessStatusAsync(Guid processId, ProcessStatus newStatus)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ProcessStatus | newStatus | New process status |
ReturnsSetWorkflowTerminatedAsync(ProcessInstance)
Set process instance status to ProcessStatus.Terminated
DeclarationTask SetWorkflowTerminatedAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsWriteInitialRecordToHistoryAsync(ProcessInstance)
Write to table WorkflowProcessTransitionHistory initial record with first activity if can.
DeclarationTask WriteInitialRecordToHistoryAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
ReturnsUpdatePersistenceStateAsync(ProcessInstance, TransitionDefinition)
Updates system parameters of the process in the store
DeclarationTask UpdatePersistenceStateAsync(ProcessInstance processInstance, TransitionDefinition transition)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process |
TransitionDefinition | transition | Last executed transition |
ReturnsIsProcessExistsAsync(Guid)
Checks existence of the process
DeclarationTask<bool> IsProcessExistsAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
ReturnsType | Description |
---|
Task<bool> | |
GetInstanceStatusAsync(Guid)
Returns status of the process ProcessStatus
DeclarationTask<ProcessStatus> GetInstanceStatusAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
ReturnsType | Description |
---|
Task<ProcessStatus> | Status of the process |
BindProcessToNewSchemeAsync(ProcessInstance)
Saves information about changed scheme to the store
DeclarationTask BindProcessToNewSchemeAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process with changed scheme <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance.ProcessScheme" data-throw-if-not-resolved="false"></xref> |
ReturnsBindProcessToNewSchemeAsync(ProcessInstance, bool)
Saves information about changed scheme to the store
DeclarationTask BindProcessToNewSchemeAsync(ProcessInstance processInstance, bool resetIsDeterminingParametersChanged)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance of the process with changed scheme <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance.ProcessScheme" data-throw-if-not-resolved="false"></xref> |
bool | resetIsDeterminingParametersChanged | True if required to reset IsDeterminingParametersChanged flag <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance.IsDeterminingParametersChanged" data-throw-if-not-resolved="false"></xref> |
ReturnsRegisterTimerAsync(Guid, Guid, string, DateTime, bool)
Register a new timer
DeclarationTask RegisterTimerAsync(Guid processId, Guid rootProcessId, string name, DateTime nextExecutionDateTime, bool notOverrideIfExists)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
Guid | rootProcessId | Id of the root process |
string | name | Timer name <see cref="!:TimerDefinition.Name"></see> |
DateTime | nextExecutionDateTime | Next date and time of timer's execution |
bool | notOverrideIfExists | If true specifies that the existing timer with same name will not be overriden <xref href="OptimaJet.Workflow.Core.Model.TimerDefinition.NotOverrideIfExists" data-throw-if-not-resolved="false"></xref> |
ReturnsClearTimersAsync(Guid, List<string>)
Removes all timers from the store, exclude listed in ignore list
DeclarationTask ClearTimersAsync(Guid processId, List<string> timersIgnoreList)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
List<string> | timersIgnoreList | Ignore list |
ReturnsGetTimersForProcessAsync(Guid)
Get all timers of a process
DeclarationTask<List<ProcessTimer>> GetTimersForProcessAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
ReturnsType | Description |
---|
Task<List<ProcessTimer>> | |
DeleteProcessAsync(Guid)
Remove all information about the process from the store
DeclarationTask DeleteProcessAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
ReturnsDeleteProcessAsync(Guid[])
Remove all information about the process from the store
DeclarationTask DeleteProcessAsync(Guid[] processIds)
ParametersType | Name | Description |
---|
System.Guid[] | processIds | List of ids of the process |
ReturnsSaveGlobalParameterAsync<T>(string, string, T)
Saves a global parameter value
DeclarationTask SaveGlobalParameterAsync<T>(string type, string name, T value)
ParametersType | Name | Description |
---|
string | type | Logical type of the parameter |
string | name | Name of the parameter |
{T} | value | Value of the parameter |
ReturnsLoadGlobalParameterAsync<T>(string, string)
Returns a global parameter value
DeclarationTask<T> LoadGlobalParameterAsync<T>(string type, string name)
ParametersType | Name | Description |
---|
string | type | Logical type of the parameter |
string | name | Name of the parameter |
ReturnsType | Description |
---|
Task<T> | Value of the parameter |
LoadGlobalParametersWithNamesAsync<T>(string, Sorting)
Returns a values and names of global parameters
DeclarationTask<Dictionary<string, T>> LoadGlobalParametersWithNamesAsync<T>(string type, Sorting sort = null)
ParametersType | Name | Description |
---|
string | type | Logical type of the parameter |
Sorting | sort | Field for sorting parameters |
ReturnsType | Description |
---|
Task<Dictionary<string, T>> | Dictionary of parameter names and values |
LoadGlobalParametersAsync<T>(string, Sorting)
Returns a global parameter values
DeclarationTask<List<T>> LoadGlobalParametersAsync<T>(string type, Sorting sort = null)
ParametersType | Name | Description |
---|
string | type | Logical type of the parameter |
Sorting | sort | Field for sorting parameters |
ReturnsType | Description |
---|
Task<List<T>> | List of parameter values |
LoadGlobalParametersWithPagingAsync<T>(string, Paging, string, Sorting)
Returns a global parameter values with paging and total quantity
DeclarationTask<PagedResponse<T>> LoadGlobalParametersWithPagingAsync<T>(string type, Paging paging, string name = null, Sorting sort = null)
ParametersType | Name | Description |
---|
string | type | Logical type of the parameter |
Paging | paging | Paging settings |
string | name | [Nullable] Search by name |
Sorting | sort | Field for sorting parameters |
ReturnsType | Description |
---|
Task<PagedResponse<T>> | Returns a global parameter values with paging and total quantity |
DeleteGlobalParametersAsync(string, string)
Deletes a global parameter
DeclarationTask DeleteGlobalParametersAsync(string type, string name = null)
ParametersType | Name | Description |
---|
string | type | Logical type of the parameter |
string | name | Name of the parameter |
ReturnsGetProcessHistoryAsync(Guid, Paging)
Returns the history of process
DeclarationTask<List<ProcessHistoryItem>> GetProcessHistoryAsync(Guid processId, Paging paging = null)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
Paging | paging | |
ReturnsType | Description |
---|
Task<List<ProcessHistoryItem>> | |
GetProcessHistoryCountAsync(Guid)
DeclarationTask<int> GetProcessHistoryCountAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | |
ReturnsBulkInitProcessesAsync(List<ProcessInstance>, ProcessStatus, CancellationToken)
DeclarationTask BulkInitProcessesAsync(List<ProcessInstance> instances, ProcessStatus status, CancellationToken token)
ParametersType | Name | Description |
---|
List<ProcessInstance> | instances | |
ProcessStatus | status | |
CancellationToken | token | |
ReturnsBulkInitProcessesAsync(List<ProcessInstance>, List<TimerToRegister>, ProcessStatus, CancellationToken)
DeclarationTask BulkInitProcessesAsync(List<ProcessInstance> instances, List<TimerToRegister> timers, ProcessStatus status, CancellationToken token)
ParametersType | Name | Description |
---|
List<ProcessInstance> | instances | |
List<TimerToRegister> | timers | |
ProcessStatus | status | |
CancellationToken | token | |
ReturnsGetProcessInstanceTreeAsync(Guid)
DeclarationTask<List<IProcessInstanceTreeItem>> GetProcessInstanceTreeAsync(Guid rootProcessId)
ParametersType | Name | Description |
---|
Guid | rootProcessId | |
ReturnsType | Description |
---|
Task<List<IProcessInstanceTreeItem>> | |
MultiServerRuntimesExistAsync()
DeclarationTask<bool> MultiServerRuntimesExistAsync()
ReturnsType | Description |
---|
Task<bool> | |
CreateWorkflowRuntimeAsync(string, RuntimeStatus)
DeclarationTask<WorkflowRuntimeModel> CreateWorkflowRuntimeAsync(string runtimeId, RuntimeStatus status)
ParametersType | Name | Description |
---|
string | runtimeId | |
RuntimeStatus | status | |
ReturnsType | Description |
---|
Task<WorkflowRuntimeModel> | |
UpdateWorkflowRuntimeStatusAsync(WorkflowRuntimeModel, RuntimeStatus)
DeclarationTask<WorkflowRuntimeModel> UpdateWorkflowRuntimeStatusAsync(WorkflowRuntimeModel runtime, RuntimeStatus status)
ParametersType | Name | Description |
---|
WorkflowRuntimeModel | runtime | |
RuntimeStatus | status | |
ReturnsType | Description |
---|
Task<WorkflowRuntimeModel> | |
UpdateWorkflowRuntimeRestorerAsync(WorkflowRuntimeModel, string)
DeclarationTask<(bool Success, WorkflowRuntimeModel UpdatedModel)> UpdateWorkflowRuntimeRestorerAsync(WorkflowRuntimeModel runtime, string restorerId)
ParametersType | Name | Description |
---|
WorkflowRuntimeModel | runtime | |
string | restorerId | |
ReturnsType | Description |
---|
Task<(bool Success, WorkflowRuntimeModel UpdatedModel)> | |
GetRunningProcessesAsync(string)
DeclarationTask<List<Guid>> GetRunningProcessesAsync(string runtimeId = null)
ParametersType | Name | Description |
---|
string | runtimeId | |
ReturnsType | Description |
---|
Task<List<Guid>> | |
GetActiveTimersForProcessAsync(Guid)
DeclarationTask<List<ProcessTimer>> GetActiveTimersForProcessAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | |
ReturnsType | Description |
---|
Task<List<ProcessTimer>> | |
DeleteInactiveTimersByProcessIdAsync(Guid)
DeclarationTask DeleteInactiveTimersByProcessIdAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | |
ReturnsDeleteTimerAsync(Guid)
DeclarationTask DeleteTimerAsync(Guid timerId)
ParametersType | Name | Description |
---|
Guid | timerId | |
ReturnsGetTopTimersToExecuteAsync(int)
DeclarationTask<List<WorkflowTimer>> GetTopTimersToExecuteAsync(int top)
ParametersType | Name | Description |
---|
int | top | |
ReturnsType | Description |
---|
Task<List<WorkflowTimer>> | |
SetTimerIgnoreAsync(Guid)
DeclarationTask<int> SetTimerIgnoreAsync(Guid id)
ParametersType | Name | Description |
---|
Guid | id | |
ReturnsActiveMultiServerRuntimesCountAsync(string)
DeclarationTask<int> ActiveMultiServerRuntimesCountAsync(string currentRuntimeId)
ParametersType | Name | Description |
---|
string | currentRuntimeId | |
ReturnsGetWorkflowRuntimeModelAsync(string)
DeclarationTask<WorkflowRuntimeModel> GetWorkflowRuntimeModelAsync(string runtimeId)
ParametersType | Name | Description |
---|
string | runtimeId | |
ReturnsType | Description |
---|
Task<WorkflowRuntimeModel> | |
GetWorkflowRuntimesAsync()
DeclarationTask<List<WorkflowRuntimeModel>> GetWorkflowRuntimesAsync()
ReturnsType | Description |
---|
Task<List<WorkflowRuntimeModel>> | |
SendRuntimeLastAliveSignalAsync()
DeclarationTask<int> SendRuntimeLastAliveSignalAsync()
ReturnsGetNextTimerDateAsync(TimerCategory, int)
DeclarationTask<DateTime?> GetNextTimerDateAsync(TimerCategory timerCategory, int timerInterval)
ParametersType | Name | Description |
---|
TimerCategory | timerCategory | |
int | timerInterval | |
ReturnsType | Description |
---|
Task<DateTime?> | |
DeleteWorkflowRuntimeAsync(string)
DeclarationTask DeleteWorkflowRuntimeAsync(string name)
ParametersType | Name | Description |
---|
string | name | |
ReturnsDropUnusedWorkflowProcessSchemeAsync()
DeclarationTask DropUnusedWorkflowProcessSchemeAsync()
ReturnsGetProcessInstancesAsync(List<(string parameterName, SortDirection sortDirection)>, Paging)
DeclarationTask<List<ProcessInstanceItem>> GetProcessInstancesAsync(List<(string parameterName, SortDirection sortDirection)> orderParameters = null, Paging paging = null)
ParametersType | Name | Description |
---|
List<(string parameterName, SortDirection sortDirection)> | orderParameters | |
Paging | paging | |
ReturnsType | Description |
---|
Task<List<ProcessInstanceItem>> | |
GetProcessInstancesCountAsync()
DeclarationTask<int> GetProcessInstancesCountAsync()
ReturnsGetSchemesAsync(List<(string parameterName, SortDirection sortDirection)>, Paging)
DeclarationTask<List<SchemeItem>> GetSchemesAsync(List<(string parameterName, SortDirection sortDirection)> orderParameters, Paging paging)
ParametersType | Name | Description |
---|
List<(string parameterName, SortDirection sortDirection)> | orderParameters | |
Paging | paging | |
ReturnsType | Description |
---|
Task<List<SchemeItem>> | |
GetSchemesCountAsync()
DeclarationTask<int> GetSchemesCountAsync()
ReturnsExtension Methods