Interface IWorkflowRuleProvider
OptimaJet.Workflow.Core.Runtime.IWorkflowRuleProvider
Defines named authorization rules used to evaluate workflow participant identities for transition restrictions.
Namespace: OptimaJet.Workflow.Core.Runtime
public interface IWorkflowRuleProviderType Hierarchy
- IWorkflowRuleProvider Current type
- Derived interfaces
- Implementing types
Methods
List<string> GetRules(string schemeCode, NamesSearchType namesSearchType) #Parameters
schemeCodeStringnamesSearchTypeNamesSearchTypeReturns
List<String>bool Check(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter) #Parameters
processInstanceProcessInstanceruntimeWorkflowRuntimeidentityIdStringruleNameStringparameterStringReturns
Remarks
Task<bool> CheckAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter, CancellationToken token) #Parameters
processInstanceProcessInstanceruntimeWorkflowRuntimeidentityIdStringruleNameStringparameterStringtokenCancellationTokenReturns
Remarks
IEnumerable<string> GetIdentities(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter) #Parameters
processInstanceProcessInstanceruntimeWorkflowRuntimeruleNameStringparameterStringReturns
IEnumerable<String>Remarks
Task<IEnumerable<string>> GetIdentitiesAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter, CancellationToken token) #Parameters
processInstanceProcessInstanceruntimeWorkflowRuntimeruleNameStringparameterStringtokenCancellationTokenReturns
Task<String>Remarks
bool IsCheckAsync(string ruleName, string schemeCode) #Parameters
ruleNameStringschemeCodeStringReturns
Remarks
bool IsGetIdentitiesAsync(string ruleName, string schemeCode) #Parameters
ruleNameStringschemeCodeStringReturns
Remarks
Remarks
A rule supports two related operations. IWorkflowRuleProvider.Check(ProcessInstance, WorkflowRuntime, string, string, string) determines whether one workflow participant identity satisfies the rule, while IWorkflowRuleProvider.GetIdentities(ProcessInstance, WorkflowRuntime, string, string) returns all identities that satisfy it. The runtime uses these operations when validating RestrictionDefinition instances and when calculating the participants allowed to execute a transition.
Implementations advertise their rule names through IWorkflowRuleProvider.GetRules(string, NamesSearchType). For each advertised rule, IWorkflowRuleProvider.IsCheckAsync(string, string) selects between IWorkflowRuleProvider.Check(ProcessInstance, WorkflowRuntime, string, string, string) and IWorkflowRuleProvider.CheckAsync(ProcessInstance, WorkflowRuntime, string, string, string, CancellationToken), while IWorkflowRuleProvider.IsGetIdentitiesAsync(string, string) independently selects between IWorkflowRuleProvider.GetIdentities(ProcessInstance, WorkflowRuntime, string, string) and IWorkflowRuleProvider.GetIdentitiesAsync(ProcessInstance, WorkflowRuntime, string, string, CancellationToken).
The rule-specific parameter normally originates from ActorDefinition.Value. During standard runtime evaluation, workflow substitutions are applied before the resulting value is passed to this provider.