Class DeactivatedWorkflowRuleProvider
OptimaJet.Workflow.Core.Runtime.DeactivatedWorkflowRuleProvider
Wraps an IWorkflowRuleProvider and allows it to be enabled or disabled dynamically.
Namespace: OptimaJet.Workflow.Core.Runtime
public sealed class DeactivatedWorkflowRuleProvider : IWorkflowRuleProviderType Hierarchy
- DeactivatedWorkflowRuleProvider Current type
- Implemented interfaces
Constructors
public DeactivatedWorkflowRuleProvider(IWorkflowRuleProvider activatedRuleProvider, Func<bool> getDisabled) #Parameters
activatedRuleProviderIWorkflowRuleProvidergetDisabled returns false.getDisabledFunc<Boolean>activatedRuleProvider.Methods
public List<string> GetRules(string schemeCode, NamesSearchType namesSearchType) #Parameters
schemeCodeStringnamesSearchTypeNamesSearchTypeReturns
List<String>public bool Check(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter) #Parameters
processInstanceProcessInstanceruntimeWorkflowRuntimeidentityIdStringruleNameStringparameterStringReturns
Remarks
public Task<bool> CheckAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter, CancellationToken token) #Parameters
processInstanceProcessInstanceruntimeWorkflowRuntimeidentityIdStringruleNameStringparameterStringtokenCancellationTokenReturns
Remarks
public IEnumerable<string> GetIdentities(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter) #Parameters
processInstanceProcessInstanceruntimeWorkflowRuntimeruleNameStringparameterStringReturns
IEnumerable<String>Remarks
public Task<IEnumerable<string>> GetIdentitiesAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter, CancellationToken token) #Parameters
processInstanceProcessInstanceruntimeWorkflowRuntimeruleNameStringparameterStringtokenCancellationTokenReturns
Task<String>Remarks
public bool IsCheckAsync(string ruleName, string schemeCode) #Parameters
ruleNameStringschemeCodeStringReturns
Remarks
public bool IsGetIdentitiesAsync(string ruleName, string schemeCode) #Parameters
ruleNameStringschemeCodeStringReturns
Remarks
Remarks
The wrapper evaluates the predicate supplied to the constructor on every method call. When the predicate returns false, the call is forwarded unchanged to the configured provider. When it returns true, the configured provider is bypassed and the call is delegated to EmptyWorkflowRuleProvider.Value. Disabling the wrapper does not modify the configured provider.
While disabled, the wrapper exposes no rule names, synchronous rule checks return false, identity lookup returns an empty sequence, and asynchronous capability checks return false. Direct calls to the asynchronous check or identity lookup methods are delegated to EmptyWorkflowRuleProvider and throw NotImplementedException.