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 |
GetIdentities(ProcessInstance, WorkflowRuntime, string, string)
Get the list of users which satisfies the rule
DeclarationIEnumerable<string> GetIdentities(ProcessInstance processInstance, WorkflowRuntime runtime, 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 | ruleName | Name of the rule to get users list |
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 |
---|---|
IEnumerable<string> | List of users which satisfies the rule |
GetIdentitiesAsync(ProcessInstance, WorkflowRuntime, string, string, CancellationToken)
Get the list of users which satisfies the rule asynchronously
DeclarationTask<IEnumerable<string>> GetIdentitiesAsync(ProcessInstance processInstance, WorkflowRuntime runtime, 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 | ruleName | Name of the rule to get users list |
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<IEnumerable<string>> | List of users which satisfies the rule |
IsCheckAsync(string, string)
Checks whether Check the rule should be called asynchronously
Declarationbool IsCheckAsync(string ruleName, string schemeCode)
Type | Name | Description |
---|---|---|
string | ruleName | Name of the action |
string | schemeCode |
Type | Description |
---|---|
bool |
IsGetIdentitiesAsync(string, string)
Checks whether Get the list of users which satisfies the rule should be called asynchronously
Declarationbool IsGetIdentitiesAsync(string ruleName, string schemeCode)
Type | Name | Description |
---|---|---|
string | ruleName | Name of the condition |
string | schemeCode |
Type | Description |
---|---|
bool |