Interface IWorkflowRuleProvider
OptimaJet.Workflow.Core.Runtime.IWorkflowRuleProvider
Interface of a rule provider, which provide rule checking and getting of a list of users which satisfies a rule TransitionDefinition.Restrictions
Namespace: OptimaJet.Workflow.Core.Runtime
public interface IWorkflowRuleProviderMethods
List<string> GetRules(string schemeCode, NamesSearchType namesSearchType) #Return all rule names
Parameters
Name
Type
Description
schemeCodeStringnamesSearchTypeNamesSearchTypeReturns
Type
Description
List<String>List of rule names
bool Check(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter) #Check the rule
Parameters
Name
Type
Description
processInstanceProcessInstanceReference to ProcessInstance for which rule is checked ProcessInstance
runtimeWorkflowRuntimeReference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
identityIdStringUser id for which rule is checking
ruleNameStringName of the rule to check
Returns
Type
Description
BooleanRule check result
Task<bool> CheckAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter, CancellationToken token) #Check the rule asynchronously
Parameters
Name
Type
Description
processInstanceProcessInstanceReference to ProcessInstance for which rule is checked ProcessInstance
runtimeWorkflowRuntimeReference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
identityIdStringUser id for which rule is checking
ruleNameStringName of the rule to check
tokenCancellationTokenCancellation token to cancel the operation
Returns
Type
Description
Task<Boolean>Rule check result
IEnumerable<string> GetIdentities(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter) #Get the list of users which satisfies the rule
Parameters
Name
Type
Description
processInstanceProcessInstanceReference to ProcessInstance for which rule is checked ProcessInstance
runtimeWorkflowRuntimeReference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
ruleNameStringName of the rule to get users list
Returns
Type
Description
IEnumerable<String>List of users which satisfies the rule
Task<IEnumerable<string>> GetIdentitiesAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter, CancellationToken token) #Get the list of users which satisfies the rule asynchronously
Parameters
Name
Type
Description
processInstanceProcessInstanceReference to ProcessInstance for which rule is checked ProcessInstance
runtimeWorkflowRuntimeReference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
ruleNameStringName of the rule to get users list
tokenCancellationTokenCancellation token to cancel the operation
Returns
Type
Description
Task<String>List of users which satisfies the rule
bool IsCheckAsync(string ruleName, string schemeCode) #Checks whether Check the rule should be called asynchronously
Parameters
Name
Type
Description
ruleNameStringName of the action
schemeCodeStringCode of the scheme to which the rule belongs
Returns
Type
Description
Booleanbool IsGetIdentitiesAsync(string ruleName, string schemeCode) #Checks whether Get the list of users which satisfies the rule should be called asynchronously
Parameters
Name
Type
Description
ruleNameStringName of the condition
schemeCodeStringCode of the scheme to which the rule belongs
Returns
Type
Description
Boolean