Interface 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
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic interface IWorkflowRuleProvider
Methods
GetRules(string, NamesSearchType)
Return all rule names
DeclarationList<string> GetRules(string schemeCode, NamesSearchType namesSearchType)
Type | Name | Description |
---|---|---|
string | schemeCode | |
NamesSearchType | namesSearchType |
Type | Description |
---|---|
List<string> | List of rule names |
Check(ProcessInstance, WorkflowRuntime, string, string, string)
Check the rule
Declarationbool Check(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | Reference to ProcessInstance for which rule is checked <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref> |
WorkflowRuntime | runtime | Reference to WorkflowRuntime object which managed specified process instance <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowRuntime" data-throw-if-not-resolved="false"></xref> |
string | identityId | User id for which rule is checking |
string | ruleName | Name of the rule to check |
string | parameter | Additional rule parameter <xref href="OptimaJet.Workflow.Core.Model.RestrictionDefinition.Actor" data-throw-if-not-resolved="false"></xref> <xref href="OptimaJet.Workflow.Core.Model.ActorDefinition.Value" data-throw-if-not-resolved="false"></xref> |
Type | Description |
---|---|
bool | Rule check result |
CheckAsync(ProcessInstance, WorkflowRuntime, string, string, string, CancellationToken)
Check the rule asynchronously
DeclarationTask<bool> CheckAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter, CancellationToken token)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | Reference to ProcessInstance for which rule is checked <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref> |
WorkflowRuntime | runtime | Reference to WorkflowRuntime object which managed specified process instance <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowRuntime" data-throw-if-not-resolved="false"></xref> |
string | identityId | User id for which rule is checking |
string | ruleName | Name of the rule to check |
string | parameter | Additional rule parameter <xref href="OptimaJet.Workflow.Core.Model.RestrictionDefinition.Actor" data-throw-if-not-resolved="false"></xref> <xref href="OptimaJet.Workflow.Core.Model.ActorDefinition.Value" data-throw-if-not-resolved="false"></xref> |
CancellationToken | token |
Type | Description |
---|---|
Task<bool> | Rule check result |