Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class WorkflowPluginWithRuleProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync, EnumRules, EnumRulesAsync>

OptimaJet.Workflow.Plugins.CustomWorkflowProviders.WorkflowPluginWithRuleProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync, EnumRules, EnumRulesAsync>

public abstract class WorkflowPluginWithRuleProvider<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync, EnumRules, EnumRulesAsync> : WorkflowPlugin<EnumActions, EnumActionsAsync, EnumConditions, EnumConditionsAsync>, ICustomMixProvider, ICustomWorkflowActionProvider, IWorkflowActionProvider, IDisableProvider, ICustomDesignerParameterFormatProvider, IDesignerParameterFormatProvider, ICustomActivityProvider, ICustomConditionProvider, IWorkflowPlugin, ICustomWorkflowRuleProvider, IWorkflowRuleProvider where EnumActions : struct where EnumActionsAsync : struct where EnumConditions : struct where EnumConditionsAsync : struct where EnumRules : struct where EnumRulesAsync : struct

Inheritance

  • System.Object
  • OptimaJet.Workflow.Plugins.CustomWorkflowProviders.WorkflowActionProvider{{EnumActions},{EnumActionsAsync},{EnumConditions},{EnumConditionsAsync}}
  • OptimaJet.Workflow.Plugins.CustomWorkflowProviders.WorkflowActionAndDesignerParameterFormatProvider{{EnumActions},{EnumActionsAsync},{EnumConditions},{EnumConditionsAsync}}
  • OptimaJet.Workflow.Plugins.CustomWorkflowProviders.CustomMixProvider{{EnumActions},{EnumActionsAsync},{EnumConditions},{EnumConditionsAsync}}
  • OptimaJet.Workflow.Plugins.CustomWorkflowProviders.WorkflowPlugin{{EnumActions},{EnumActionsAsync},{EnumConditions},{EnumConditionsAsync}}

Implemented Interfaces

Properties

Name
Type
RulesExcludeRule #
Dictionary<ExcludeRule>
RulesAsyncExcludeRule #
Dictionary<ExcludeRule>
RulesCheck #
Dictionary<CheckDelegate>
RulesCheckAsync #
Dictionary<CheckAsyncDelegate>
RulesGetIdentities #
Dictionary<GetIdentitiesDelegate>
RulesGetIdentitiesAsync #
Dictionary<GetIdentitiesAsyncDelegate>

Methods

protected virtual List<EnumRules> GetRules(NamesSearchType namesSearchType) #

Parameters

Name
Type
Description
namesSearchType
NamesSearchType

Returns

Type
Description
List<EnumRules>
protected virtual List<EnumRulesAsync> GetRulesAsync(NamesSearchType namesSearchType) #

Parameters

Name
Type
Description
namesSearchType
NamesSearchType

Returns

Type
Description
List<EnumRulesAsync>
public virtual List<string> GetRules(string schemeCode, NamesSearchType namesSearchType) #
Return all rule names

Parameters

Name
Type
Description
schemeCode
String
namesSearchType
NamesSearchType

Returns

Type
Description
List<String>
List of rule names
public virtual bool Check(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter) #
Check the rule

Parameters

Name
Type
Description
processInstance
ProcessInstance
Reference to ProcessInstance for which rule is checked ProcessInstance
runtime
WorkflowRuntime
Reference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
identityId
String
User id for which rule is checking
ruleName
String
Name of the rule to check
parameter
String

Returns

Type
Description
Boolean
Rule check result
public virtual Task<bool> CheckAsync(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName, string parameter, CancellationToken token) #
Check the rule asynchronously

Parameters

Name
Type
Description
processInstance
ProcessInstance
Reference to ProcessInstance for which rule is checked ProcessInstance
runtime
WorkflowRuntime
Reference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
identityId
String
User id for which rule is checking
ruleName
String
Name of the rule to check
parameter
String
token
CancellationToken
Cancellation token to cancel the operation

Returns

Type
Description
Task<Boolean>
Rule check result
public virtual IEnumerable<string> GetIdentities(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter) #
Get the list of users which satisfies the rule

Parameters

Name
Type
Description
processInstance
ProcessInstance
Reference to ProcessInstance for which rule is checked ProcessInstance
runtime
WorkflowRuntime
Reference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
ruleName
String
Name of the rule to get users list
parameter
String

Returns

Type
Description
IEnumerable<String>
List of users which satisfies the rule
public virtual 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
processInstance
ProcessInstance
Reference to ProcessInstance for which rule is checked ProcessInstance
runtime
WorkflowRuntime
Reference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
ruleName
String
Name of the rule to get users list
parameter
String
token
CancellationToken
Cancellation token to cancel the operation

Returns

Type
Description
Task<String>
List of users which satisfies the rule
public virtual bool IsCheckAsync(string ruleName, string schemeCode) #
Checks whether Check the rule should be called asynchronously

Parameters

Name
Type
Description
ruleName
String
Name of the action
schemeCode
String
Code of the scheme to which the rule belongs

Returns

Type
Description
Boolean
public virtual bool IsGetIdentitiesAsync(string ruleName, string schemeCode) #
Checks whether Get the list of users which satisfies the rule should be called asynchronously

Parameters

Name
Type
Description
ruleName
String
Name of the condition
schemeCode
String
Code of the scheme to which the rule belongs

Returns

Type
Description
Boolean
public void ExcludeRule(string ruleName, ExcludeRule excludeRule = null) #

Parameters

Name
Type
Description
ruleName
String
excludeRule
ExcludeRule
public bool ValidateRules(out List<string> rules, bool withExceptions = false) #

Parameters

Name
Type
Description
rules
List<String>
withExceptions
Boolean

Returns

Type
Description
Boolean
public bool ValidateRulesAsync(out List<string> rulesAsync, bool withExceptions = false) #

Parameters

Name
Type
Description
rulesAsync
List<String>
withExceptions
Boolean

Returns

Type
Description
Boolean
public void OverrideRuleProvider(IWorkflowRuleProvider workflowRuleProvider) #
Sets a custom workflow rule provider for the plugin, replacing the default implementation for resolving rules.

Parameters

Name
Type
Description
workflowRuleProvider
IWorkflowRuleProvider
The IWorkflowRuleProvider implementation to use for resolving workflow rules.