Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Interface ISchemePersistenceProvider<TSchemeMedium>

OptimaJet.Workflow.Core.Persistence.ISchemePersistenceProvider<TSchemeMedium>

Interface of a persistence provider, which provide storing of schemes

public interface ISchemePersistenceProvider<TSchemeMedium> where TSchemeMedium : class

Methods

Task<SchemeDefinition<TSchemeMedium>> 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<SchemeDefinition<TSchemeMedium>>
Not parsed scheme of the process
Task<SchemeDefinition<TSchemeMedium>> GetProcessSchemeBySchemeIdAsync(Guid schemeId) #
Gets not parsed scheme by id

Parameters

Name
Type
Description
schemeId
Guid
Id of the scheme

Returns

Type
Description
Task<SchemeDefinition<TSchemeMedium>>
Not parsed scheme of the process
Task<SchemeDefinition<TSchemeMedium>> 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<SchemeDefinition<TSchemeMedium>>
Not parsed scheme of the process
Task<TSchemeMedium> 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<TSchemeMedium>
Not parsed scheme of the process
Task<SchemeDefinition<TSchemeMedium>> SaveSchemeAsync(SchemeDefinition<TSchemeMedium> scheme) #
Saves scheme to a store

Parameters

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

Returns

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

Parameters

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

Returns

Type
Description
Task
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
Task SaveSchemeAsync(string schemeCode, bool canBeInlined, List<string> inlinedSchemes, string scheme, List<string> tags, string? tenantId = null) #
Saves scheme to a store

Parameters

Name
Type
Description
schemeCode
String
Name of the scheme
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
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
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>
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>
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>
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>
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>
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
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
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
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
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
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
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
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
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
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
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
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