Interface ISchemePersistenceProvider<TSchemeMedium>
OptimaJet.Workflow.Core.Persistence.ISchemePersistenceProvider<TSchemeMedium>
Interface of a persistence provider, which provide storing of schemes
Namespace: OptimaJet.Workflow.Core.Persistence
public interface ISchemePersistenceProvider<TSchemeMedium> where TSchemeMedium : classMethods
Task<SchemeDefinition<TSchemeMedium>> 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<SchemeDefinition<TSchemeMedium>>Not parsed scheme of the process
Task<SchemeDefinition<TSchemeMedium>> GetProcessSchemeBySchemeIdAsync(Guid schemeId) #Gets not parsed scheme by id
Parameters
Name
Type
Description
schemeIdGuidId 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
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<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
codeStringName of the scheme
tenantIdStringTenant 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
schemeSchemeDefinition<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
schemeSchemeDefinition<TSchemeMedium>Not parsed scheme of the process
Returns
Type
Description
TaskTask 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
TaskTask 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
schemeCodeStringName of the scheme
canBeInlinedBooleanif 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
TaskTask<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
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>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>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>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>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
TaskTask 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
TaskTask 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
TaskTask 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
TaskTask RemoveSchemeTagsAsync(string schemeCode, params string[] tags) #Removes tags from the shared scheme with the given schemeCode.
Parameters
Name
Type
Description
schemeCodeStringtagsString[]Returns
Type
Description
TaskTask 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
TaskTask 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
TaskTask 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
TaskTask 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
TaskTask 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
TaskTask SetSchemeTagsAsync(string schemeCode, params string[] tags) #Sets tags on the shared scheme with the given schemeCode.
Parameters
Name
Type
Description
schemeCodeStringtagsString[]Returns
Type
Description
TaskTask 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
Task