Workflow Engine .NET

Assembly: OptimaJet.Workflow.SQLite

Class SqliteProvider

OptimaJet.Workflow.SQLite.SqliteProvider

public class SqliteProvider : IWorkflowProvider, IPersistenceProvider, IApprovalProvider, IFormDataProvider, ISchemePersistenceProvider<XElement>, IWorkflowGenerator<XElement>, IMigratable

Inheritance

  • System.Object

Implemented Interfaces

Constructors

public SqliteProvider(string connectionString, string schemaName = "main", bool writeToHistory = true, bool writeSubProcessToRoot = false) #

Parameters

Name
Type
Description
connectionString
String
schemaName
String
writeToHistory
Boolean
writeSubProcessToRoot
Boolean
public SqliteProvider(PersistenceProviderOptions options) #

Parameters

Name
Type
Description
options
PersistenceProviderOptions

Properties

Name
Type
Id #
String
Unique identifier of the persistence provider implementation
ConnectionString #
String
Connection string of the persistence provider
WorkflowProcessInstance #
WorkflowProcessInstance
WorkflowProcessInstanceStatus #
WorkflowProcessInstanceStatus
WorkflowProcessInstancePersistence #
WorkflowProcessInstancePersistence
WorkflowProcessTransitionHistory #
WorkflowProcessTransitionHistory
WorkflowProcessTimer #
WorkflowProcessTimer
WorkflowInbox #
WorkflowInbox
WorkflowApprovalHistory #
WorkflowApprovalHistory
WorkflowGlobalParameter #
WorkflowGlobalParameter
WorkflowProcessScheme #
WorkflowProcessScheme
WorkflowRuntime #
WorkflowRuntime
WorkflowScheme #
WorkflowScheme
WorkflowSync #
WorkflowSync
ProcessInstanceTree #
ProcessInstanceTree
WorkflowForm #
WorkflowForm
IsBulkOperationsSupported #
Boolean

Methods

public virtual void Init(WorkflowRuntime runtime) #
Init the provider

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Workflow runtime instance which owned the provider
public virtual Task DeleteInactiveTimersByProcessIdAsync(Guid processId) #

Parameters

Name
Type
Description
processId
Guid

Returns

Type
Description
Task
public virtual Task DeleteTimerAsync(Guid timerId) #

Parameters

Name
Type
Description
timerId
Guid

Returns

Type
Description
Task
public virtual Task<List<Guid>> GetRunningProcessesAsync(string runtimeId = null) #

Parameters

Name
Type
Description
runtimeId
String

Returns

Type
Description
Task<Guid>
public virtual Task<WorkflowRuntimeModel> CreateWorkflowRuntimeAsync(string runtimeId, RuntimeStatus status) #

Parameters

Name
Type
Description
runtimeId
String
status
RuntimeStatus

Returns

Type
Description
Task<WorkflowRuntimeModel>
public virtual Task DeleteWorkflowRuntimeAsync(string name) #

Parameters

Name
Type
Description
name
String

Returns

Type
Description
Task
public virtual Task DropUnusedWorkflowProcessSchemeAsync() #

Returns

Type
Description
Task
public Task<List<ProcessInstanceItem>> GetProcessInstancesAsync(List<(string parameterName, SortDirection sortDirection)> orderParameters = null, Paging paging = null) #

Parameters

Name
Type
Description
orderParameters
List<SortDirection>
paging
Paging

Returns

Type
Description
Task<ProcessInstanceItem>
public Task<int> GetProcessInstancesCountAsync() #

Returns

Type
Description
Task<Int32>
public Task<List<SchemeItem>> GetSchemesAsync(List<(string parameterName, SortDirection sortDirection)> orderParameters = null, Paging paging = null) #

Parameters

Name
Type
Description
orderParameters
List<SortDirection>
paging
Paging

Returns

Type
Description
Task<SchemeItem>
public Task<int> GetSchemesCountAsync() #

Returns

Type
Description
Task<Int32>
public virtual Task<WorkflowRuntimeModel> UpdateWorkflowRuntimeStatusAsync(WorkflowRuntimeModel runtime, RuntimeStatus status) #

Parameters

Name
Type
Description
runtime
WorkflowRuntimeModel
status
RuntimeStatus

Returns

Type
Description
Task<WorkflowRuntimeModel>
public virtual Task<(bool Success, WorkflowRuntimeModel UpdatedModel)> UpdateWorkflowRuntimeRestorerAsync(WorkflowRuntimeModel runtime, string restorerId) #

Parameters

Name
Type
Description
runtime
WorkflowRuntimeModel
restorerId
String

Returns

Type
Description
Task<WorkflowRuntimeModel>
public virtual Task<bool> MultiServerRuntimesExistAsync() #

Returns

Type
Description
Task<Boolean>
public virtual Task<int> ActiveMultiServerRuntimesCountAsync(string currentRuntimeId) #

Parameters

Name
Type
Description
currentRuntimeId
String

Returns

Type
Description
Task<Int32>
public virtual Task InitializeProcessAsync(ProcessInstance processInstance) #
Initialize a process instance in persistence store

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task BindProcessToNewSchemeAsync(ProcessInstance processInstance) #
Saves information about changed scheme to the store

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process with changed scheme ProcessInstance.ProcessScheme

Returns

Type
Description
Task
public virtual Task FillProcessParametersAsync(ProcessInstance processInstance) #
Fills system ParameterPurpose.System and persisted ParameterPurpose.Persistence parameters of the process

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task FillPersistedProcessParametersAsync(ProcessInstance processInstance) #
Fills persisted ParameterPurpose.Persistence parameters of the process

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task FillPersistedProcessParameterAsync(ProcessInstance processInstance, string parameterName) #
Fills persisted ParameterPurpose.Persistence parameter of the process

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process
parameterName
String

Returns

Type
Description
Task
public virtual Task FillSystemProcessParametersAsync(ProcessInstance processInstance) #
Fills system ParameterPurpose.System parameters of the process

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task SavePersistenceParametersAsync(ProcessInstance processInstance) #
Saves persisted ParameterPurpose.Persistence parameters of the process to store

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task SavePersistenceParameterAsync(ProcessInstance processInstance, string parameterName) #
Save persisted ParameterPurpose.Persistence parameter of the process to store

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process
parameterName
String
Name of parameter for save

Returns

Type
Description
Task
public virtual Task RemoveParameterAsync(ProcessInstance processInstance, string parameterName) #
Remove persisted ParameterPurpose.Persistence parameter of the process from store

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process
parameterName
String
Name of parameter for save

Returns

Type
Description
Task
public virtual Task SetProcessStatusAsync(Guid processId, ProcessStatus newStatus) #
Set process instance status to newStatus

Parameters

Name
Type
Description
processId
Guid
Process id
newStatus
ProcessStatus
New process status

Returns

Type
Description
Task
public virtual Task SetWorkflowInitializedAsync(ProcessInstance processInstance) #
Set process instance status to ProcessStatus.Initialized

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task SetWorkflowIdledAsync(ProcessInstance processInstance) #
Set process instance status to ProcessStatus.Idled

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task SetWorkflowRunningAsync(ProcessInstance processInstance) #
Set process instance status to ProcessStatus.Running

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task SetWorkflowFinalizedAsync(ProcessInstance processInstance) #
Set process instance status to ProcessStatus.Finalized

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task SetWorkflowTerminatedAsync(ProcessInstance processInstance) #
Set process instance status to ProcessStatus.Terminated

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public Task WriteInitialRecordToHistoryAsync(ProcessInstance processInstance) #
Write to table WorkflowProcessTransitionHistory initial record with first activity if can.

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process

Returns

Type
Description
Task
public virtual Task UpdatePersistenceStateAsync(ProcessInstance processInstance, TransitionDefinition transition) #
Updates system parameters of the process in the store

Parameters

Name
Type
Description
processInstance
ProcessInstance
Instance of the process
transition
TransitionDefinition
Last executed transition

Returns

Type
Description
Task
public virtual Task<bool> IsProcessExistsAsync(Guid processId) #
Checks existence of the process

Parameters

Name
Type
Description
processId
Guid
Id of the process

Returns

Type
Description
Task<Boolean>
public virtual Task<bool> IsProcessExistsAsync(Guid processId, string tenantId) #
Checks existence of the process in the specified tenant

Parameters

Name
Type
Description
processId
Guid
Id of the process
tenantId
String
Tenant id of the process

Returns

Type
Description
Task<Boolean>
public virtual Task<ProcessStatus> GetInstanceStatusAsync(Guid processId) #
Returns status of the process ProcessStatus

Parameters

Name
Type
Description
processId
Guid
Id of the process

Returns

Type
Description
Task<ProcessStatus>
Status of the process
public virtual Task DeleteProcessAsync(Guid[] processIds) #
Remove all information about the process from the store

Parameters

Name
Type
Description
processIds
Guid[]
List of ids of the process

Returns

Type
Description
Task
public virtual Task DeleteProcessAsync(Guid processId) #
Remove all information about the process from the store

Parameters

Name
Type
Description
processId
Guid
Id of the process

Returns

Type
Description
Task
public virtual Task RegisterTimerAsync(Guid processId, Guid rootProcessId, string name, DateTime nextExecutionDateTime, string tenantId, bool notOverrideIfExists) #
Register a new timer

Parameters

Name
Type
Description
processId
Guid
Id of the process
rootProcessId
Guid
Id of the root process
name
String
Timer name TimerDefinition.Name
nextExecutionDateTime
DateTime
Next date and time of timer's execution
tenantId
String
Tenant's identifier (if exist)
notOverrideIfExists
Boolean
If true specifies that the existing timer with same name will not be overriden TimerDefinition.NotOverrideIfExists

Returns

Type
Description
Task
public virtual Task ClearTimersAsync(Guid processId, List<string> timersIgnoreList) #
Removes all timers from the store, exclude listed in ignore list

Parameters

Name
Type
Description
processId
Guid
Id of the process
timersIgnoreList
List<String>
Ignore list

Returns

Type
Description
Task
public virtual Task<int> SetTimerIgnoreAsync(Guid timerId) #

Parameters

Name
Type
Description
timerId
Guid

Returns

Type
Description
Task<Int32>
public virtual Task<List<WorkflowTimer>> GetTopTimersToExecuteAsync(int top) #

Parameters

Name
Type
Description
top
Int32

Returns

Type
Description
Task<WorkflowTimer>
public virtual Task SaveGlobalParameterAsync<T>(string type, string name, T value) #
Saves a global parameter value

Parameters

Name
Type
Description
type
String
Logical type of the parameter
name
String
Name of the parameter
value
{T}
Value of the parameter

Returns

Type
Description
Task
public virtual Task SaveTenantGlobalParameterAsync<T>(TenantGlobalParameterKey key, T value) #
Saves a tenant-scoped global parameter value

Parameters

Name
Type
Description
key
TenantGlobalParameterKey
Global parameter key. TenantGlobalParameterKey.Name is required.
value
{T}
Value of the parameter

Returns

Type
Description
Task
public virtual Task<T> LoadGlobalParameterAsync<T>(string type, string name) #
Returns a global parameter value

Parameters

Name
Type
Description
type
String
Logical type of the parameter
name
String
Name of the parameter

Returns

Type
Description
Task<T>
Value of the parameter
public virtual Task<T> LoadTenantGlobalParameterAsync<T>(TenantGlobalParameterKey key) #
Returns a tenant-scoped global parameter value

Parameters

Name
Type
Description
key
TenantGlobalParameterKey
Global parameter key. TenantGlobalParameterKey.Name is required.

Returns

Type
Description
Task<T>
Value of the parameter
public Task<Dictionary<string, T>> LoadGlobalParametersWithNamesAsync<T>(string type, Sorting sort = null) #
Returns a values and names of global parameters

Parameters

Name
Type
Description
type
String
Logical type of the parameter
sort
Sorting
Field for sorting parameters

Returns

Type
Description
Task<String,{T>
Dictionary of parameter names and values
public Task<Dictionary<string, T>> LoadTenantGlobalParametersWithNamesAsync<T>(TenantGlobalParameterScope scope, Sorting sort = null) #
Returns values and names of tenant-scoped global parameters

Parameters

Name
Type
Description
scope
TenantGlobalParameterScope
Global parameter scope.
sort
Sorting
Field for sorting parameters

Returns

Type
Description
Task<String,{T>
Dictionary of parameter names and values
public virtual Task<List<T>> LoadGlobalParametersAsync<T>(string type, Sorting sort = null) #
Returns a global parameter values

Parameters

Name
Type
Description
type
String
Logical type of the parameter
sort
Sorting
Field for sorting parameters

Returns

Type
Description
Task<List<T>>
List of parameter values
public virtual Task<List<T>> LoadTenantGlobalParametersAsync<T>(TenantGlobalParameterScope scope, Sorting sort = null) #
Returns tenant-scoped global parameter values

Parameters

Name
Type
Description
scope
TenantGlobalParameterScope
Global parameter scope.
sort
Sorting
Field for sorting parameters

Returns

Type
Description
Task<List<T>>
List of parameter values
public virtual Task<PagedResponse<T>> LoadGlobalParametersWithPagingAsync<T>(string type, Paging paging, string name = null, Sorting sort = null) #
Returns a global parameter values with paging and total quantity

Parameters

Name
Type
Description
type
String
Logical type of the parameter
paging
Paging
Paging settings
name
String
[Nullable] Search by name
sort
Sorting
Field for sorting parameters

Returns

Type
Description
Task<PagedResponse<T>>
Returns a global parameter values with paging and total quantity
public virtual Task<PagedResponse<T>> LoadTenantGlobalParametersWithPagingAsync<T>(TenantGlobalParameterScope scope, Paging paging, Sorting sort = null) #
Returns tenant-scoped global parameter values with paging and total quantity

Parameters

Name
Type
Description
scope
TenantGlobalParameterScope
Global parameter scope.
paging
Paging
Paging settings
sort
Sorting
Field for sorting parameters

Returns

Type
Description
Task<PagedResponse<T>>
Returns tenant-scoped global parameter values with paging and total quantity
public virtual Task DeleteGlobalParametersAsync(string type, string name = null) #
Deletes a global parameter

Parameters

Name
Type
Description
type
String
Logical type of the parameter
name
String
Name of the parameter

Returns

Type
Description
Task
public virtual Task DeleteTenantGlobalParametersAsync(TenantGlobalParameterScope scope) #
Deletes tenant-scoped global parameters

Parameters

Name
Type
Description
scope
TenantGlobalParameterScope
Global parameter scope.

Returns

Type
Description
Task
public virtual Task DeleteTenantGlobalParameterAsync(TenantGlobalParameterKey key) #
Deletes a tenant-scoped global parameter

Parameters

Name
Type
Description
key
TenantGlobalParameterKey
Global parameter key.

Returns

Type
Description
Task
public virtual Task<List<ProcessHistoryItem>> GetProcessHistoryAsync(Guid processId, Paging paging = null) #
Returns the history of process

Parameters

Name
Type
Description
processId
Guid
Id of the process
paging
Paging

Returns

Type
Description
Task<ProcessHistoryItem>
public Task<int> GetProcessHistoryCountAsync(Guid processId) #

Parameters

Name
Type
Description
processId
Guid

Returns

Type
Description
Task<Int32>
public virtual Task<List<ProcessTimer>> GetTimersForProcessAsync(Guid processId) #
Get all timers of a process

Parameters

Name
Type
Description
processId
Guid
Id of the process

Returns

Type
Description
Task<ProcessTimer>
public virtual Task<List<IProcessInstanceTreeItem>> GetProcessInstanceTreeAsync(Guid rootProcessId) #

Parameters

Name
Type
Description
rootProcessId
Guid

Returns

Type
Description
Task<IProcessInstanceTreeItem>
public virtual Task<List<ProcessTimer>> GetActiveTimersForProcessAsync(Guid processId) #

Parameters

Name
Type
Description
processId
Guid

Returns

Type
Description
Task<ProcessTimer>
public virtual Task<WorkflowRuntimeModel> GetWorkflowRuntimeModelAsync(string runtimeId) #

Parameters

Name
Type
Description
runtimeId
String

Returns

Type
Description
Task<WorkflowRuntimeModel>
public virtual Task<int> SendRuntimeLastAliveSignalAsync() #

Returns

Type
Description
Task<Int32>
public virtual Task<DateTime?> GetNextTimerDateAsync(TimerCategory timerCategory, int timerInterval) #

Parameters

Name
Type
Description
timerCategory
TimerCategory
timerInterval
Int32

Returns

Type
Description
Task<DateTime>
public virtual Task<List<WorkflowRuntimeModel>> GetWorkflowRuntimesAsync() #

Returns

Type
Description
Task<WorkflowRuntimeModel>
public void ConfigureMigrations(IMigrationRunnerBuilder builder, Assembly assembly) #
Configures FluentMigrator to run the migration from the provided assembly.

Parameters

Name
Type
Description
builder
IMigrationRunnerBuilder
The instance of the interface for configuring migration runner services.
assembly
Assembly
The assembly with migrations.
public virtual Task<SchemeDefinition<XElement>> GetProcessSchemeByProcessIdAsync(Guid processId) #
Gets not parsed scheme of the process by process id

Parameters

Name
Type
Description
processId
Guid
Id of the process

Returns

Type
Description
Task<XElement>
Not parsed scheme of the process
public virtual Task<SchemeDefinition<XElement>> GetProcessSchemeBySchemeIdAsync(Guid schemeId) #
Gets not parsed scheme by id

Parameters

Name
Type
Description
schemeId
Guid
Id of the scheme

Returns

Type
Description
Task<XElement>
Not parsed scheme of the process
public virtual Task<SchemeDefinition<XElement>> GetProcessSchemeWithParametersAsync(string schemeCode, Guid? rootSchemeId, bool ignoreObsolete, string tenantId = null) #
Gets not parsed scheme by scheme name

Parameters

Name
Type
Description
schemeCode
String
Name of the scheme
rootSchemeId
Nullable<Guid>
Id of the root scheme in case of subprocess
ignoreObsolete
Boolean
True if you need to ignore obsolete schemes
tenantId
String
Tenant id of the scheme

Returns

Type
Description
Task<XElement>
Not parsed scheme of the process
public virtual Task SetSchemeIsObsoleteAsync(string schemeCode, string tenantId = null) #
Sets sign IsObsolete to the scheme

Parameters

Name
Type
Description
schemeCode
String
Name of the scheme
tenantId
String
Tenant id of the scheme. If null, marks schemes with the specified code obsolete in all tenants.

Returns

Type
Description
Task
public virtual Task<SchemeDefinition<XElement>> SaveSchemeAsync(SchemeDefinition<XElement> scheme) #
Saves scheme to a store

Parameters

Name
Type
Description
scheme
SchemeDefinition<XElement>
Not parsed scheme of the process

Returns

Type
Description
Task<XElement>
public virtual Task UpsertSchemeAsync(SchemeDefinition<XElement> scheme) #
Updates or Inserts scheme to a store

Parameters

Name
Type
Description
scheme
SchemeDefinition<XElement>
Not parsed scheme of the process

Returns

Type
Description
Task
public virtual Task SaveSchemeAsync(string schemaCode, bool canBeInlined, List<string> inlinedSchemes, string scheme, List<string> tags, string tenantId = null) #
Saves scheme to a store

Parameters

Name
Type
Description
schemaCode
String
canBeInlined
Boolean
if true - this scheme can be inlined into another schemes
inlinedSchemes
List<String>
Scheme codes to be inlined into this scheme
scheme
String
Not parsed scheme
tags
List<String>
Tags of the scheme
tenantId
String
Tenant id of the scheme

Returns

Type
Description
Task
public virtual Task<XElement> GetSchemeAsync(string code, string tenantId = null) #
Gets not parsed scheme by scheme name

Parameters

Name
Type
Description
code
String
Name of the scheme
tenantId
String
Tenant id of the scheme

Returns

Type
Description
Task<XElement>
Not parsed scheme of the process
public virtual Task<List<string>> GetInlinedSchemeCodesAsync(string tenantId = null) #
Returns the list of scheme codes that can be inlined into other schemes. If tenantId is null, returns only shared schemes. If tenantId is specified, returns shared and tenant-specific schemes with distinct codes.

Parameters

Name
Type
Description
tenantId
String
Tenant id of the scheme

Returns

Type
Description
Task<String>
The list of scheme codes
public virtual Task<List<string>> GetRelatedByInliningSchemeCodesAsync(string schemeCode, string tenantId = null) #
Returns the list of scheme codes into which the scheme with the given code has been inlined

Parameters

Name
Type
Description
schemeCode
String
Inlined scheme code
tenantId
String
Tenant id of the parent scheme. If null, searches in all tenants and shared schemes.

Returns

Type
Description
Task<String>
public virtual Task<List<string>> SearchSchemesByTagsAsync(params string[] tags) #
Returns the list of shared scheme codes with the given tags. If tags are null, returns all shared scheme codes.

Parameters

Name
Type
Description
tags
String[]

Returns

Type
Description
Task<String>
public virtual Task<List<string>> SearchSchemesByTagsAsync(IEnumerable<string> tags) #
Returns the list of shared scheme codes with the given tags. If tags are null, returns all shared scheme codes.

Parameters

Name
Type
Description
tags
IEnumerable<String>

Returns

Type
Description
Task<String>
public virtual Task<List<string>> SearchSchemesByTagsAsync(string tenantId, IEnumerable<string> tags) #
Returns the list of scheme codes with the given tags in the exact tenant scope. If tags are null, returns all scheme codes in the specified tenant scope. If tenantId is null, searches only in shared schemes.

Parameters

Name
Type
Description
tenantId
String
tags
IEnumerable<String>

Returns

Type
Description
Task<String>
public virtual Task<List<string>> SearchSchemesByTagsInTenantAsync(string tenantId, params string[] tags) #
Returns the list of scheme codes with the given tags in the specified tenant only.

Parameters

Name
Type
Description
tenantId
String
tags
String[]

Returns

Type
Description
Task<String>
public virtual Task AddSchemeTagsAsync(string schemeCode, params string[] tags) #
Adds tags to the shared scheme with the given schemeCode.

Parameters

Name
Type
Description
schemeCode
String
tags
String[]

Returns

Type
Description
Task
public virtual Task AddSchemeTagsAsync(string schemeCode, IEnumerable<string> tags) #
Adds tags to the shared scheme with the given schemeCode.

Parameters

Name
Type
Description
schemeCode
String
tags
IEnumerable<String>

Returns

Type
Description
Task
public virtual Task AddSchemeTagsAsync(string schemeCode, string tenantId, IEnumerable<string> tags) #
Adds tags to the scheme with the given schemeCode in the exact tenant scope. If tenantId is null, updates only the shared scheme.

Parameters

Name
Type
Description
schemeCode
String
tenantId
String
tags
IEnumerable<String>

Returns

Type
Description
Task
public virtual Task AddSchemeTagsInTenantAsync(string schemeCode, string tenantId, params string[] tags) #
Adds tags to the scheme with the given schemeCode in the specified tenant only.

Parameters

Name
Type
Description
schemeCode
String
tenantId
String
tags
String[]

Returns

Type
Description
Task
public virtual Task RemoveSchemeTagsAsync(string schemeCode, params string[] tags) #
Removes tags from the shared scheme with the given schemeCode.

Parameters

Name
Type
Description
schemeCode
String
tags
String[]

Returns

Type
Description
Task
public virtual Task RemoveSchemeTagsAsync(string schemeCode, IEnumerable<string> tags) #
Removes tags from the shared scheme with the given schemeCode.

Parameters

Name
Type
Description
schemeCode
String
tags
IEnumerable<String>

Returns

Type
Description
Task
public virtual Task RemoveSchemeTagsAsync(string schemeCode, string tenantId, IEnumerable<string> tags) #
Removes tags from the scheme with the given schemeCode in the exact tenant scope. If tenantId is null, updates only the shared scheme.

Parameters

Name
Type
Description
schemeCode
String
tenantId
String
tags
IEnumerable<String>

Returns

Type
Description
Task
public virtual Task RemoveSchemeTagsInTenantAsync(string schemeCode, string tenantId, params string[] tags) #
Removes tags from the scheme with the given schemeCode in the specified tenant only.

Parameters

Name
Type
Description
schemeCode
String
tenantId
String
tags
String[]

Returns

Type
Description
Task
public virtual Task SetSchemeTagsAsync(string schemeCode, params string[] tags) #
Sets tags on the shared scheme with the given schemeCode.

Parameters

Name
Type
Description
schemeCode
String
tags
String[]

Returns

Type
Description
Task
public virtual Task SetSchemeTagsAsync(string schemeCode, IEnumerable<string> tags) #
Sets tags on the shared scheme with the given schemeCode.

Parameters

Name
Type
Description
schemeCode
String
tags
IEnumerable<String>

Returns

Type
Description
Task
public virtual Task SetSchemeTagsAsync(string schemeCode, string tenantId, IEnumerable<string> tags) #
Sets tags on the scheme with the given schemeCode in the exact tenant scope. If tenantId is null, updates only the shared scheme.

Parameters

Name
Type
Description
schemeCode
String
tenantId
String
tags
IEnumerable<String>

Returns

Type
Description
Task
public virtual Task SetSchemeTagsInTenantAsync(string schemeCode, string tenantId, params string[] tags) #
Sets tags on the scheme with the given schemeCode in the specified tenant only.

Parameters

Name
Type
Description
schemeCode
String
tenantId
String
tags
String[]

Returns

Type
Description
Task
public virtual Task<XElement> GenerateAsync(string schemeCode, string tenantId = null) #
Generate not parsed process scheme

Parameters

Name
Type
Description
schemeCode
String
Code of the scheme
tenantId
String
Tenant id of the scheme

Returns

Type
Description
Task<XElement>
Not parsed process scheme
public virtual Task BulkInitProcessesAsync(List<ProcessInstance> instances, ProcessStatus status, CancellationToken token) #

Parameters

Name
Type
Description
instances
List<ProcessInstance>
status
ProcessStatus
token
CancellationToken

Returns

Type
Description
Task
public virtual Task BulkInitProcessesAsync(List<ProcessInstance> instances, List<TimerToRegister> timers, ProcessStatus status, CancellationToken token) #

Parameters

Name
Type
Description
instances
List<ProcessInstance>
timers
List<TimerToRegister>
status
ProcessStatus
token
CancellationToken

Returns

Type
Description
Task
public virtual Task DropWorkflowInboxAsync(Guid processId) #

Parameters

Name
Type
Description
processId
Guid

Returns

Type
Description
Task
public virtual Task InsertInboxAsync(List<InboxItem> newActors) #

Parameters

Name
Type
Description
newActors
List<InboxItem>

Returns

Type
Description
Task
public Task<int> GetInboxCountByProcessIdAsync(Guid processId) #

Parameters

Name
Type
Description
processId
Guid

Returns

Type
Description
Task<Int32>
public Task<int> GetInboxCountByIdentityIdAsync(string identityId) #

Parameters

Name
Type
Description
identityId
String

Returns

Type
Description
Task<Int32>
public Task<List<InboxItem>> GetInboxByProcessIdAsync(Guid processId, Paging paging = null, CultureInfo culture = null) #

Parameters

Name
Type
Description
processId
Guid
paging
Paging
culture
CultureInfo

Returns

Type
Description
Task<InboxItem>
public Task<List<InboxItem>> GetInboxByIdentityIdAsync(string identityId, Paging paging = null, CultureInfo culture = null) #

Parameters

Name
Type
Description
identityId
String
paging
Paging
culture
CultureInfo

Returns

Type
Description
Task<InboxItem>
public Task FillApprovalHistoryAsync(ApprovalHistoryItem approvalHistoryItem) #

Parameters

Name
Type
Description
approvalHistoryItem
ApprovalHistoryItem

Returns

Type
Description
Task
public Task DropApprovalHistoryByProcessIdAsync(Guid processId) #

Parameters

Name
Type
Description
processId
Guid

Returns

Type
Description
Task
public Task DropApprovalHistoryByIdentityIdAsync(string identityId) #

Parameters

Name
Type
Description
identityId
String

Returns

Type
Description
Task
public virtual Task DropEmptyApprovalHistoryAsync(Guid processId) #

Parameters

Name
Type
Description
processId
Guid

Returns

Type
Description
Task
public Task<int> GetApprovalHistoryCountByProcessIdAsync(Guid processId) #

Parameters

Name
Type
Description
processId
Guid

Returns

Type
Description
Task<Int32>
public Task<int> GetApprovalHistoryCountByIdentityIdAsync(string identityId) #

Parameters

Name
Type
Description
identityId
String

Returns

Type
Description
Task<Int32>
public Task<List<ApprovalHistoryItem>> GetApprovalHistoryByProcessIdAsync(Guid processId, Paging paging = null) #

Parameters

Name
Type
Description
processId
Guid
paging
Paging

Returns

Type
Description
Task<ApprovalHistoryItem>
public Task<List<ApprovalHistoryItem>> GetApprovalHistoryByIdentityIdAsync(string identityId, Paging paging = null) #

Parameters

Name
Type
Description
identityId
String
paging
Paging

Returns

Type
Description
Task<ApprovalHistoryItem>
public Task<int> GetOutboxCountByIdentityIdAsync(string identityId) #

Parameters

Name
Type
Description
identityId
String

Returns

Type
Description
Task<Int32>
public Task<List<OutboxItem>> GetOutboxByIdentityIdAsync(string identityId, Paging paging = null) #

Parameters

Name
Type
Description
identityId
String
paging
Paging

Returns

Type
Description
Task<OutboxItem>
public Task<WorkflowForm> GetFormAsync(string name, int? version = null, string tenantId = null) #
Gets the form by name and version.

Parameters

Name
Type
Description
name
String
The name of the form.
version
Nullable<Int32>
The version of the form. If null, the latest version is retrieved from the tenant scope when it exists; otherwise the latest shared version is returned.
tenantId
String
The tenant identifier. When specified, latest-form reads prefer the tenant scope and fall back to shared only when the tenant scope is empty. Version-specific reads fall back to shared only when the tenant scope for the form is empty.

Returns

Type
Description
Task<WorkflowForm>
A task that represents the asynchronous operation. The task result contains the form.
public Task<List<string>> GetFormNamesAsync(string tenantId = null) #
Gets the list of form names.

Parameters

Name
Type
Description
tenantId
String
The tenant identifier. When specified, the provider returns distinct names from the tenant and shared scopes.

Returns

Type
Description
Task<String>
A task that represents the asynchronous operation. The task result contains the list of form names.
public Task<List<int>> GetFormVersionsAsync(string name, string tenantId = null) #
Gets the list of form versions by form name.

Parameters

Name
Type
Description
name
String
The name of the form.
tenantId
String
The tenant identifier. When specified, the provider returns tenant-scoped versions when tenant rows exist; otherwise it falls back to shared versions.

Returns

Type
Description
Task<Int32>
A task that represents the asynchronous operation. The task result contains the list of form versions.
public Task<WorkflowForm> CreateNewFormVersionAsync(string name, string defaultDefinition, int? version = null, string tenantId = null) #
Creates a new version of the form.

Parameters

Name
Type
Description
name
String
The name of the form.
defaultDefinition
String
Default form definition used when the target scope and shared bootstrap scope do not contain a source form.
version
Nullable<Int32>
The source version to copy the definition from. If null, the latest version is used from the target scope, or from the shared scope when bootstrapping an empty tenant.
tenantId
String
The tenant identifier. New versions are always created in the specified tenant scope or in the shared scope when null. When creating the first tenant version, the provider may copy the definition from the shared scope.

Returns

Type
Description
Task<WorkflowForm>
A task that represents the asynchronous operation. The task result contains the new form version.
public Task<WorkflowForm> CreateNewFormIfNotExistsAsync(string name, string defaultDefinition, string tenantId = null) #
Creates a new form with the specified name if it does not already exist.

Parameters

Name
Type
Description
name
String
The name of the form to be created or checked for existence.
defaultDefinition
String
Default form definition.
tenantId
String
The tenant identifier. New forms are created in the specified tenant scope or in the shared scope when null.

Returns

Type
Description
Task<WorkflowForm>
The result contains the created form or the existing form if one with the specified name already exists.
public Task<int> UpdateFormAsync(string name, int version, int lockValue, string definition, string tenantId = null) #
Updates the form.

Parameters

Name
Type
Description
name
String
The name of the form.
version
Int32
The version of the form.
lockValue
Int32
The lock value to ensure concurrency.
definition
String
The definition of the form.
tenantId
String
The tenant identifier. Updates are applied only within the specified tenant scope or the shared scope when null.

Returns

Type
Description
Task<Int32>
A task that represents the asynchronous operation. The task result contains the new lock value.
public Task DeleteFormVersionAsync(string name, int version, string tenantId = null) #
Deletes a specific version of the form.

Parameters

Name
Type
Description
name
String
The name of the form.
version
Int32
The version of the form to delete.
tenantId
String
The tenant identifier. Deletes are applied only within the specified tenant scope or the shared scope when null.

Returns

Type
Description
Task
A task that represents the asynchronous operation.
public Task DeleteFormAsync(string name, string tenantId = null) #
Deletes all versions of the form.

Parameters

Name
Type
Description
name
String
The name of the form.
tenantId
String
The tenant identifier. Deletes are applied only within the specified tenant scope or the shared scope when null.

Returns

Type
Description
Task
A task that represents the asynchronous operation.

Derived Types