Class WorkflowPluginWithRuleProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync, EnumRules, EnumRulesAsync>
OptimaJet.Workflow.Plugins.CustomWorkflowProviders.WorkflowPluginWithRuleProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync, EnumRules, EnumRulesAsync>
Namespace: OptimaJet.Workflow.Plugins.CustomWorkflowProviders
public abstract class WorkflowPluginWithRuleProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync, EnumRules, EnumRulesAsync> : WorkflowPlugin<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>, ICustomMixProvider, ICustomWorkflowActionProvider, IWorkflowActionProvider, IDisableProvider, ICustomDesignerParameterFormatProvider, IDesignerParameterFormatProvider, ICustomActivityProvider, ICustomConditionProvider, IWorkflowPlugin, ICustomWorkflowRuleProvider, IWorkflowRuleProvider where EnumActions : struct where EnumActionsAsync : struct where EnumConditions : struct where EnumConditionsAsync : struct where EnumRules : struct where EnumRulesAsync : structType Hierarchy
- WorkflowActionProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>
- WorkflowActionAndDesignerParameterFormatProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>
- CustomMixProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>
- WorkflowPlugin<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>
- WorkflowPluginWithRuleProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync, EnumRules, EnumRulesAsync> Current type
- WorkflowPlugin<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>
- CustomMixProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>
- WorkflowActionAndDesignerParameterFormatProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>
Properties
protected Dictionary<EnumRules, ExcludeRule> RulesExcludeRule { get; } #protected Dictionary<EnumRulesAsync, ExcludeRule> RulesAsyncExcludeRule { get; } #protected Dictionary<EnumRules, CheckDelegate> RulesCheck { get; } #protected Dictionary<EnumRulesAsync, CheckAsyncDelegate> RulesCheckAsync { get; } #protected Dictionary<EnumRules, GetIdentitiesDelegate> RulesGetIdentities { get; } #protected Dictionary<EnumRulesAsync, GetIdentitiesAsyncDelegate> RulesGetIdentitiesAsync { get; } #Methods
protected virtual List<EnumRules> GetRules(NamesSearchType namesSearchType) #Parameters
Name
Type
Description
namesSearchTypeNamesSearchTypeReturns
Type
Description
List<EnumRules>protected virtual List<EnumRulesAsync> GetRulesAsync(NamesSearchType namesSearchType) #Parameters
Name
Type
Description
namesSearchTypeNamesSearchTypeReturns
Type
Description
List<EnumRulesAsync>public virtual List<string> GetRules(string schemeCode, NamesSearchType namesSearchType) #Gets the rule names implemented by this provider for a process scheme.
Parameters
Name
Type
Description
schemeCodeStringThe effective process scheme code used to resolve scheme-specific rules, or null when the caller has no process scheme context.
namesSearchTypeNamesSearchTypeThe filtering mode. NamesSearchType.All includes rules excluded by provider-specific exclusion settings and is used for runtime rule resolution. NamesSearchType.NotExcluded omits those rules, for example when the Designer builds its list of available rules.
Returns
Type
Description
List<String>A non-null list of rule names implemented by this provider for the requested scheme and filtering mode.
public virtual bool Check(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter) #Determines whether a workflow participant identity satisfies a rule.
Parameters
Name
Type
Description
processInstanceProcessInstanceThe process instance whose state and parameters provide the evaluation context.
runtimeWorkflowRuntimeThe workflow runtime executing the evaluation.
identityIdStringThe application-defined value identifying the workflow participant to evaluate, such as a login, user name, database identifier, or another identifier understood by the provider.
ruleNameStringThe name of a rule advertised by IWorkflowRuleProvider.GetRules(string, NamesSearchType).
parameterStringThe provider-defined rule parameter. During standard restriction evaluation, this is the value from ActorDefinition.Value after workflow substitutions have been applied.
Returns
Remarks
The runtime calls this method when IWorkflowRuleProvider.IsCheckAsync(string, string) returns false for the same rule and scheme.
public virtual Task<bool> CheckAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter, CancellationToken token) #Asynchronously determines whether a workflow participant identity satisfies a rule.
Parameters
Name
Type
Description
processInstanceProcessInstanceThe process instance whose state and parameters provide the evaluation context.
runtimeWorkflowRuntimeThe workflow runtime executing the evaluation.
identityIdStringThe application-defined value identifying the workflow participant to evaluate, such as a login, user name, database identifier, or another identifier understood by the provider.
ruleNameStringThe name of a rule advertised by IWorkflowRuleProvider.GetRules(string, NamesSearchType).
parameterStringThe provider-defined rule parameter. During standard restriction evaluation, this is the value from ActorDefinition.Value after workflow substitutions have been applied.
tokenCancellationTokenThe token supplied by the current workflow operation to observe cancellation.
Returns
Remarks
The runtime calls this method when IWorkflowRuleProvider.IsCheckAsync(string, string) returns true for the same rule and scheme.
public virtual IEnumerable<string> GetIdentities(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter) #Gets all workflow participant identities that satisfy a rule.
Parameters
Name
Type
Description
processInstanceProcessInstanceThe process instance whose state and parameters provide the lookup context.
runtimeWorkflowRuntimeThe workflow runtime executing the lookup.
ruleNameStringThe name of a rule advertised by IWorkflowRuleProvider.GetRules(string, NamesSearchType).
parameterStringThe provider-defined rule parameter. During standard actor calculation, this is the value from ActorDefinition.Value after workflow substitutions have been applied.
Returns
Type
Description
IEnumerable<String>A non-null sequence of application-defined workflow participant identities. Each value must use the same identity representation accepted by IWorkflowRuleProvider.Check(ProcessInstance, WorkflowRuntime, string, string, string).
Remarks
The runtime calls this method when IWorkflowRuleProvider.IsGetIdentitiesAsync(string, string) returns false for the same rule and scheme.
public virtual Task<IEnumerable<string>> GetIdentitiesAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter, CancellationToken token) #Asynchronously gets all workflow participant identities that satisfy a rule.
Parameters
Name
Type
Description
processInstanceProcessInstanceThe process instance whose state and parameters provide the lookup context.
runtimeWorkflowRuntimeThe workflow runtime executing the lookup.
ruleNameStringThe name of a rule advertised by IWorkflowRuleProvider.GetRules(string, NamesSearchType).
parameterStringThe provider-defined rule parameter. During standard actor calculation, this is the value from ActorDefinition.Value after workflow substitutions have been applied.
tokenCancellationTokenThe token supplied by the current workflow operation to observe cancellation.
Returns
Type
Description
Task<String>A task whose result is a non-null sequence of application-defined workflow participant identities. Each value must use the same identity representation accepted by IWorkflowRuleProvider.Check(ProcessInstance, WorkflowRuntime, string, string, string).
Remarks
The runtime calls this method when IWorkflowRuleProvider.IsGetIdentitiesAsync(string, string) returns true for the same rule and scheme.
public virtual bool IsCheckAsync(string ruleName, string schemeCode) #Indicates whether the runtime should call IWorkflowRuleProvider.CheckAsync(ProcessInstance, WorkflowRuntime, string, string, string, CancellationToken) instead of IWorkflowRuleProvider.Check(ProcessInstance, WorkflowRuntime, string, string, string) for a rule.
Parameters
Name
Type
Description
ruleNameStringThe name of a rule advertised by IWorkflowRuleProvider.GetRules(string, NamesSearchType).
schemeCodeStringThe effective process scheme code used to resolve the rule.
Returns
Remarks
This choice is independent of the identity lookup mode returned by IWorkflowRuleProvider.IsGetIdentitiesAsync(string, string).
public virtual bool IsGetIdentitiesAsync(string ruleName, string schemeCode) #Indicates whether the runtime should call IWorkflowRuleProvider.GetIdentitiesAsync(ProcessInstance, WorkflowRuntime, string, string, CancellationToken) instead of IWorkflowRuleProvider.GetIdentities(ProcessInstance, WorkflowRuntime, string, string) for a rule.
Parameters
Name
Type
Description
ruleNameStringThe name of a rule advertised by IWorkflowRuleProvider.GetRules(string, NamesSearchType).
schemeCodeStringThe effective process scheme code used to resolve the rule.
Returns
Remarks
This choice is independent of the rule-checking mode returned by IWorkflowRuleProvider.IsCheckAsync(string, string).
public void ExcludeRule(string ruleName, ExcludeRule excludeRule = null) #Parameters
Name
Type
Description
ruleNameStringexcludeRuleExcludeRulepublic bool ValidateRules(out List<string> rules, bool withExceptions = false) #Parameters
Name
Type
Description
rulesList<String>withExceptionsBooleanReturns
Type
Description
Booleanpublic bool ValidateRulesAsync(out List<string> rulesAsync, bool withExceptions = false) #Parameters
Name
Type
Description
rulesAsyncList<String>withExceptionsBooleanReturns
Type
Description
Booleanpublic void OverrideRuleProvider(IWorkflowRuleProvider workflowRuleProvider) #Sets a custom workflow rule provider for the plugin, replacing the default implementation for resolving rules.
Parameters
Name
Type
Description
workflowRuleProviderIWorkflowRuleProviderThe IWorkflowRuleProvider implementation to use for resolving workflow rules.