Class SqliteProvider
OptimaJet.Workflow.SQLite.SqliteProvider
Namespace: OptimaJet.Workflow.SQLite
public class SqliteProvider : IWorkflowProvider, IPersistenceProvider, IApprovalProvider, IFormDataProvider, ISchemePersistenceProvider<XElement>, IWorkflowGenerator<XElement>, IMigratableInheritance
- System.Object
Implemented Interfaces
- OptimaJet.Workflow.Core.Persistence.IWorkflowProvider
- OptimaJet.Workflow.Core.Persistence.IPersistenceProvider
- OptimaJet.Workflow.Core.Persistence.IApprovalProvider
- OptimaJet.Workflow.Core.Persistence.IFormDataProvider
- OptimaJet.Workflow.Core.Persistence.ISchemePersistenceProvider{System.Xml.Linq.XElement}
- OptimaJet.Workflow.Core.Generator.IWorkflowGenerator{System.Xml.Linq.XElement}
- OptimaJet.Workflow.Migrator.IMigratable
Constructors
public SqliteProvider(string connectionString, string schemaName = "main", bool writeToHistory = true, bool writeSubProcessToRoot = false) #Parameters
Name
Type
Description
connectionStringStringschemaNameStringwriteToHistoryBooleanwriteSubProcessToRootBooleanpublic SqliteProvider(PersistenceProviderOptions options) #Parameters
Name
Type
Description
optionsPersistenceProviderOptionsProperties
Name
Type
Id #StringUnique identifier of the persistence provider implementation
ConnectionString #StringConnection string of the persistence provider
WorkflowProcessInstance #WorkflowProcessInstanceWorkflowProcessInstanceStatus #WorkflowProcessInstanceStatusWorkflowProcessInstancePersistence #WorkflowProcessInstancePersistenceWorkflowProcessTransitionHistory #WorkflowProcessTransitionHistoryWorkflowProcessTimer #WorkflowProcessTimerWorkflowInbox #WorkflowInboxWorkflowApprovalHistory #WorkflowApprovalHistoryWorkflowGlobalParameter #WorkflowGlobalParameterWorkflowProcessScheme #WorkflowProcessSchemeWorkflowRuntime #WorkflowRuntimeWorkflowScheme #WorkflowSchemeWorkflowSync #WorkflowSyncProcessInstanceTree #ProcessInstanceTreeWorkflowForm #WorkflowFormIsBulkOperationsSupported #BooleanMethods
public virtual void Init(WorkflowRuntime runtime) #Init the provider
Parameters
Name
Type
Description
runtimeWorkflowRuntimeWorkflow runtime instance which owned the provider
public virtual Task DeleteInactiveTimersByProcessIdAsync(Guid processId) #Parameters
Name
Type
Description
processIdGuidReturns
Type
Description
Taskpublic virtual Task DeleteTimerAsync(Guid timerId) #Parameters
Name
Type
Description
timerIdGuidReturns
Type
Description
Taskpublic virtual Task<List<Guid>> GetRunningProcessesAsync(string runtimeId = null) #Parameters
Name
Type
Description
runtimeIdStringReturns
Type
Description
Task<Guid>public virtual Task<WorkflowRuntimeModel> CreateWorkflowRuntimeAsync(string runtimeId, RuntimeStatus status) #Parameters
Name
Type
Description
runtimeIdStringstatusRuntimeStatusReturns
Type
Description
Task<WorkflowRuntimeModel>public virtual Task DeleteWorkflowRuntimeAsync(string name) #Parameters
Name
Type
Description
nameStringReturns
Type
Description
Taskpublic virtual Task DropUnusedWorkflowProcessSchemeAsync() #Returns
Type
Description
Taskpublic Task<List<ProcessInstanceItem>> GetProcessInstancesAsync(List<(string parameterName, SortDirection sortDirection)> orderParameters = null, Paging paging = null) #Parameters
Name
Type
Description
orderParametersList<SortDirection>pagingPagingReturns
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
orderParametersList<SortDirection>pagingPagingReturns
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
runtimeWorkflowRuntimeModelstatusRuntimeStatusReturns
Type
Description
Task<WorkflowRuntimeModel>public virtual Task<(bool Success, WorkflowRuntimeModel UpdatedModel)> UpdateWorkflowRuntimeRestorerAsync(WorkflowRuntimeModel runtime, string restorerId) #Parameters
Name
Type
Description
runtimeWorkflowRuntimeModelrestorerIdStringReturns
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
currentRuntimeIdStringReturns
Type
Description
Task<Int32>public virtual Task InitializeProcessAsync(ProcessInstance processInstance) #Initialize a process instance in persistence store
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task BindProcessToNewSchemeAsync(ProcessInstance processInstance) #Saves information about changed scheme to the store
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process with changed scheme ProcessInstance.ProcessScheme
Returns
Type
Description
Taskpublic virtual Task FillProcessParametersAsync(ProcessInstance processInstance) #Fills system ParameterPurpose.System and persisted ParameterPurpose.Persistence parameters of the process
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task FillPersistedProcessParametersAsync(ProcessInstance processInstance) #Fills persisted ParameterPurpose.Persistence parameters of the process
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task FillPersistedProcessParameterAsync(ProcessInstance processInstance, string parameterName) #Fills persisted ParameterPurpose.Persistence parameter of the process
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
parameterNameStringReturns
Type
Description
Taskpublic virtual Task FillSystemProcessParametersAsync(ProcessInstance processInstance) #Fills system ParameterPurpose.System parameters of the process
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task SavePersistenceParametersAsync(ProcessInstance processInstance) #Saves persisted ParameterPurpose.Persistence parameters of the process to store
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task SavePersistenceParameterAsync(ProcessInstance processInstance, string parameterName) #Save persisted ParameterPurpose.Persistence parameter of the process to store
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
parameterNameStringName of parameter for save
Returns
Type
Description
Taskpublic virtual Task RemoveParameterAsync(ProcessInstance processInstance, string parameterName) #Remove persisted ParameterPurpose.Persistence parameter of the process from store
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
parameterNameStringName of parameter for save
Returns
Type
Description
Taskpublic virtual Task SetProcessStatusAsync(Guid processId, ProcessStatus newStatus) #Set process instance status to newStatus
Parameters
Name
Type
Description
processIdGuidProcess id
newStatusProcessStatusNew process status
Returns
Type
Description
Taskpublic virtual Task SetWorkflowInitializedAsync(ProcessInstance processInstance) #Set process instance status to ProcessStatus.Initialized
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task SetWorkflowIdledAsync(ProcessInstance processInstance) #Set process instance status to ProcessStatus.Idled
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task SetWorkflowRunningAsync(ProcessInstance processInstance) #Set process instance status to ProcessStatus.Running
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task SetWorkflowFinalizedAsync(ProcessInstance processInstance) #Set process instance status to ProcessStatus.Finalized
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task SetWorkflowTerminatedAsync(ProcessInstance processInstance) #Set process instance status to ProcessStatus.Terminated
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic Task WriteInitialRecordToHistoryAsync(ProcessInstance processInstance) #Write to table WorkflowProcessTransitionHistory initial record with first activity if can.
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
Returns
Type
Description
Taskpublic virtual Task UpdatePersistenceStateAsync(ProcessInstance processInstance, TransitionDefinition transition) #Updates system parameters of the process in the store
Parameters
Name
Type
Description
processInstanceProcessInstanceInstance of the process
transitionTransitionDefinitionLast executed transition
Returns
Type
Description
Taskpublic virtual Task<bool> IsProcessExistsAsync(Guid processId) #Checks existence of the process
Parameters
Name
Type
Description
processIdGuidId 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
processIdGuidId of the process
tenantIdStringTenant 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
processIdGuidId 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
processIdsGuid[]List of ids of the process
Returns
Type
Description
Taskpublic virtual Task DeleteProcessAsync(Guid processId) #Remove all information about the process from the store
Parameters
Name
Type
Description
processIdGuidId of the process
Returns
Type
Description
Taskpublic virtual Task RegisterTimerAsync(Guid processId, Guid rootProcessId, string name, DateTime nextExecutionDateTime, string tenantId, bool notOverrideIfExists) #Register a new timer
Parameters
Name
Type
Description
processIdGuidId of the process
rootProcessIdGuidId of the root process
nameStringTimer name TimerDefinition.Name
nextExecutionDateTimeDateTimeNext date and time of timer's execution
tenantIdStringTenant's identifier (if exist)
notOverrideIfExistsBooleanIf true specifies that the existing timer with same name will not be overriden TimerDefinition.NotOverrideIfExists
Returns
Type
Description
Taskpublic virtual Task ClearTimersAsync(Guid processId, List<string> timersIgnoreList) #Removes all timers from the store, exclude listed in ignore list
Parameters
Name
Type
Description
processIdGuidId of the process
timersIgnoreListList<String>Ignore list
Returns
Type
Description
Taskpublic virtual Task<int> SetTimerIgnoreAsync(Guid timerId) #Parameters
Name
Type
Description
timerIdGuidReturns
Type
Description
Task<Int32>public virtual Task<List<WorkflowTimer>> GetTopTimersToExecuteAsync(int top) #Parameters
Name
Type
Description
topInt32Returns
Type
Description
Task<WorkflowTimer>public virtual Task SaveGlobalParameterAsync<T>(string type, string name, T value) #Saves a global parameter value
Parameters
Name
Type
Description
typeStringLogical type of the parameter
nameStringName of the parameter
value{T}Value of the parameter
Returns
Type
Description
Taskpublic virtual Task SaveTenantGlobalParameterAsync<T>(TenantGlobalParameterKey key, T value) #Saves a tenant-scoped global parameter value
Parameters
Name
Type
Description
keyTenantGlobalParameterKeyGlobal parameter key. TenantGlobalParameterKey.Name is required.
value{T}Value of the parameter
Returns
Type
Description
Taskpublic virtual Task<T> LoadGlobalParameterAsync<T>(string type, string name) #Returns a global parameter value
Parameters
Name
Type
Description
typeStringLogical type of the parameter
nameStringName 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
keyTenantGlobalParameterKeyGlobal 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
typeStringLogical type of the parameter
sortSortingField 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
scopeTenantGlobalParameterScopeGlobal parameter scope.
sortSortingField 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
typeStringLogical type of the parameter
sortSortingField 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
scopeTenantGlobalParameterScopeGlobal parameter scope.
sortSortingField 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
typeStringLogical type of the parameter
pagingPagingPaging settings
nameString[Nullable] Search by name
sortSortingField 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
scopeTenantGlobalParameterScopeGlobal parameter scope.
pagingPagingPaging settings
sortSortingField 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
typeStringLogical type of the parameter
nameStringName of the parameter
Returns
Type
Description
Taskpublic virtual Task DeleteTenantGlobalParametersAsync(TenantGlobalParameterScope scope) #Deletes tenant-scoped global parameters
Parameters
Name
Type
Description
scopeTenantGlobalParameterScopeGlobal parameter scope.
Returns
Type
Description
Taskpublic virtual Task DeleteTenantGlobalParameterAsync(TenantGlobalParameterKey key) #Deletes a tenant-scoped global parameter
Parameters
Name
Type
Description
keyTenantGlobalParameterKeyGlobal parameter key.
Returns
Type
Description
Taskpublic virtual Task<List<ProcessHistoryItem>> GetProcessHistoryAsync(Guid processId, Paging paging = null) #Returns the history of process
Parameters
Name
Type
Description
processIdGuidId of the process
pagingPagingReturns
Type
Description
Task<ProcessHistoryItem>public Task<int> GetProcessHistoryCountAsync(Guid processId) #Parameters
Name
Type
Description
processIdGuidReturns
Type
Description
Task<Int32>public virtual Task<List<ProcessTimer>> GetTimersForProcessAsync(Guid processId) #Get all timers of a process
Parameters
Name
Type
Description
processIdGuidId of the process
Returns
Type
Description
Task<ProcessTimer>public virtual Task<List<IProcessInstanceTreeItem>> GetProcessInstanceTreeAsync(Guid rootProcessId) #Parameters
Name
Type
Description
rootProcessIdGuidReturns
Type
Description
Task<IProcessInstanceTreeItem>public virtual Task<List<ProcessTimer>> GetActiveTimersForProcessAsync(Guid processId) #Parameters
Name
Type
Description
processIdGuidReturns
Type
Description
Task<ProcessTimer>public virtual Task<WorkflowRuntimeModel> GetWorkflowRuntimeModelAsync(string runtimeId) #Parameters
Name
Type
Description
runtimeIdStringReturns
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
timerCategoryTimerCategorytimerIntervalInt32Returns
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
builderIMigrationRunnerBuilderThe instance of the interface for configuring migration runner services.
assemblyAssemblyThe 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
processIdGuidId 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
schemeIdGuidId 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
schemeCodeStringName of the scheme
rootSchemeIdNullable<Guid>Id of the root scheme in case of subprocess
ignoreObsoleteBooleanTrue if you need to ignore obsolete schemes
tenantIdStringTenant 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
schemeCodeStringName of the scheme
tenantIdStringTenant id of the scheme. If null, marks schemes with the specified code obsolete in all tenants.
Returns
Type
Description
Taskpublic virtual Task<SchemeDefinition<XElement>> SaveSchemeAsync(SchemeDefinition<XElement> scheme) #Saves scheme to a store
Parameters
Name
Type
Description
schemeSchemeDefinition<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
schemeSchemeDefinition<XElement>Not parsed scheme of the process
Returns
Type
Description
Taskpublic 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
schemaCodeStringcanBeInlinedBooleanif true - this scheme can be inlined into another schemes
inlinedSchemesList<String>Scheme codes to be inlined into this scheme
schemeStringNot parsed scheme
tagsList<String>Tags of the scheme
tenantIdStringTenant id of the scheme
Returns
Type
Description
Taskpublic virtual Task<XElement> GetSchemeAsync(string code, string tenantId = null) #Gets not parsed scheme by scheme name
Parameters
Name
Type
Description
codeStringName of the scheme
tenantIdStringTenant 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
tenantIdStringTenant id of the scheme
Returns
Type
Description
Task<String>The list of scheme codes
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
tagsString[]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
tagsIEnumerable<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
tenantIdStringtagsIEnumerable<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
tenantIdStringtagsString[]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
schemeCodeStringtagsString[]Returns
Type
Description
Taskpublic virtual Task AddSchemeTagsAsync(string schemeCode, IEnumerable<string> tags) #Adds tags to the shared scheme with the given schemeCode.
Parameters
Name
Type
Description
schemeCodeStringtagsIEnumerable<String>Returns
Type
Description
Taskpublic 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
schemeCodeStringtenantIdStringtagsIEnumerable<String>Returns
Type
Description
Taskpublic 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
schemeCodeStringtenantIdStringtagsString[]Returns
Type
Description
Taskpublic virtual Task RemoveSchemeTagsAsync(string schemeCode, params string[] tags) #Removes tags from the shared scheme with the given schemeCode.
Parameters
Name
Type
Description
schemeCodeStringtagsString[]Returns
Type
Description
Taskpublic virtual Task RemoveSchemeTagsAsync(string schemeCode, IEnumerable<string> tags) #Removes tags from the shared scheme with the given schemeCode.
Parameters
Name
Type
Description
schemeCodeStringtagsIEnumerable<String>Returns
Type
Description
Taskpublic 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
schemeCodeStringtenantIdStringtagsIEnumerable<String>Returns
Type
Description
Taskpublic 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
schemeCodeStringtenantIdStringtagsString[]Returns
Type
Description
Taskpublic virtual Task SetSchemeTagsAsync(string schemeCode, params string[] tags) #Sets tags on the shared scheme with the given schemeCode.
Parameters
Name
Type
Description
schemeCodeStringtagsString[]Returns
Type
Description
Taskpublic virtual Task SetSchemeTagsAsync(string schemeCode, IEnumerable<string> tags) #Sets tags on the shared scheme with the given schemeCode.
Parameters
Name
Type
Description
schemeCodeStringtagsIEnumerable<String>Returns
Type
Description
Taskpublic 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
schemeCodeStringtenantIdStringtagsIEnumerable<String>Returns
Type
Description
Taskpublic 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
schemeCodeStringtenantIdStringtagsString[]Returns
Type
Description
Taskpublic virtual Task<XElement> GenerateAsync(string schemeCode, string tenantId = null) #Generate not parsed process scheme
Parameters
Name
Type
Description
schemeCodeStringCode of the scheme
tenantIdStringTenant 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
instancesList<ProcessInstance>statusProcessStatustokenCancellationTokenReturns
Type
Description
Taskpublic virtual Task BulkInitProcessesAsync(List<ProcessInstance> instances, List<TimerToRegister> timers, ProcessStatus status, CancellationToken token) #Parameters
Name
Type
Description
instancesList<ProcessInstance>timersList<TimerToRegister>statusProcessStatustokenCancellationTokenReturns
Type
Description
Taskpublic virtual Task DropWorkflowInboxAsync(Guid processId) #Parameters
Name
Type
Description
processIdGuidReturns
Type
Description
Taskpublic virtual Task InsertInboxAsync(List<InboxItem> newActors) #Parameters
Name
Type
Description
newActorsList<InboxItem>Returns
Type
Description
Taskpublic Task<int> GetInboxCountByProcessIdAsync(Guid processId) #Parameters
Name
Type
Description
processIdGuidReturns
Type
Description
Task<Int32>public Task<int> GetInboxCountByIdentityIdAsync(string identityId) #Parameters
Name
Type
Description
identityIdStringReturns
Type
Description
Task<Int32>public Task<List<InboxItem>> GetInboxByProcessIdAsync(Guid processId, Paging paging = null, CultureInfo culture = null) #Parameters
Name
Type
Description
processIdGuidpagingPagingcultureCultureInfoReturns
Type
Description
Task<InboxItem>public Task<List<InboxItem>> GetInboxByIdentityIdAsync(string identityId, Paging paging = null, CultureInfo culture = null) #Parameters
Name
Type
Description
identityIdStringpagingPagingcultureCultureInfoReturns
Type
Description
Task<InboxItem>public Task FillApprovalHistoryAsync(ApprovalHistoryItem approvalHistoryItem) #Parameters
Name
Type
Description
approvalHistoryItemApprovalHistoryItemReturns
Type
Description
Taskpublic Task DropApprovalHistoryByProcessIdAsync(Guid processId) #Parameters
Name
Type
Description
processIdGuidReturns
Type
Description
Taskpublic Task DropApprovalHistoryByIdentityIdAsync(string identityId) #Parameters
Name
Type
Description
identityIdStringReturns
Type
Description
Taskpublic virtual Task DropEmptyApprovalHistoryAsync(Guid processId) #Parameters
Name
Type
Description
processIdGuidReturns
Type
Description
Taskpublic Task<int> GetApprovalHistoryCountByProcessIdAsync(Guid processId) #Parameters
Name
Type
Description
processIdGuidReturns
Type
Description
Task<Int32>public Task<int> GetApprovalHistoryCountByIdentityIdAsync(string identityId) #Parameters
Name
Type
Description
identityIdStringReturns
Type
Description
Task<Int32>public Task<List<ApprovalHistoryItem>> GetApprovalHistoryByProcessIdAsync(Guid processId, Paging paging = null) #Parameters
Name
Type
Description
processIdGuidpagingPagingReturns
Type
Description
Task<ApprovalHistoryItem>public Task<List<ApprovalHistoryItem>> GetApprovalHistoryByIdentityIdAsync(string identityId, Paging paging = null) #Parameters
Name
Type
Description
identityIdStringpagingPagingReturns
Type
Description
Task<ApprovalHistoryItem>public Task<int> GetOutboxCountByIdentityIdAsync(string identityId) #Parameters
Name
Type
Description
identityIdStringReturns
Type
Description
Task<Int32>public Task<List<OutboxItem>> GetOutboxByIdentityIdAsync(string identityId, Paging paging = null) #Parameters
Name
Type
Description
identityIdStringpagingPagingReturns
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
nameStringThe name of the form.
versionNullable<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.
tenantIdStringThe 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
tenantIdStringThe 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
nameStringThe name of the form.
tenantIdStringThe 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
nameStringThe name of the form.
defaultDefinitionStringDefault form definition used when the target scope and shared bootstrap scope do not contain a source form.
versionNullable<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.
tenantIdStringThe 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
nameStringThe name of the form to be created or checked for existence.
defaultDefinitionStringDefault form definition.
tenantIdStringThe 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
nameStringThe name of the form.
versionInt32The version of the form.
lockValueInt32The lock value to ensure concurrency.
definitionStringThe definition of the form.
tenantIdStringThe 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
nameStringThe name of the form.
versionInt32The version of the form to delete.
tenantIdStringThe tenant identifier. Deletes are applied only within the specified tenant scope or the shared scope when null.
Returns
Type
Description
TaskA task that represents the asynchronous operation.
public Task DeleteFormAsync(string name, string tenantId = null) #Deletes all versions of the form.
Parameters
Name
Type
Description
nameStringThe name of the form.
tenantIdStringThe tenant identifier. Deletes are applied only within the specified tenant scope or the shared scope when null.
Returns
Type
Description
TaskA task that represents the asynchronous operation.