Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class WorkflowActionProvider<TEnumActions, TEnumActionsAsync, TEnumConditions, TEnumConditionsAsync>

OptimaJet.Workflow.Plugins.CustomWorkflowProviders.WorkflowActionProvider<TEnumActions, TEnumActionsAsync, TEnumConditions, TEnumConditionsAsync>

public abstract class WorkflowActionProvider<TEnumActions, TEnumActionsAsync, TEnumConditions, TEnumConditionsAsync> : ICustomWorkflowActionProvider, IWorkflowActionProvider, IDisableProvider where TEnumActions : struct where TEnumActionsAsync : struct where TEnumConditions : struct where TEnumConditionsAsync : struct

Inheritance

  • System.Object

Implemented Interfaces

Constructors

public WorkflowActionProvider() #

Properties

Name
Type
Disabled #
Boolean
Actions #
Dictionary<ActionDelegate>
ActionsAsync #
Dictionary<ActionAsyncDelegate>
Conditions #
Dictionary<ConditionDelegate>
ConditionsAsync #
Dictionary<ConditionAsyncDelegate>
ActionsDescriptions #
Dictionary<String>
ActionsAsyncDescriptions #
Dictionary<String>
ActionsAsyncTemplates #
Dictionary<String>
ConditionsDescriptions #
Dictionary<String>
ConditionsAsyncDescriptions #
Dictionary<String>
ConditionsAsyncTemplates #
Dictionary<String>
ActionsExcludeRule #
Dictionary<ExcludeRule>
ActionsAsyncExcludeRule #
Dictionary<ExcludeRule>
ConditionsExcludeRule #
Dictionary<ExcludeRule>
ConditionsAsyncExcludeRule #
Dictionary<ExcludeRule>
ActionParameter #
String

Methods

public void ExcludeAction(string actionName, ExcludeRule excludeRule = null) #

Parameters

Name
Type
Description
actionName
String
excludeRule
ExcludeRule
public void ExcludeCondition(string conditionName, ExcludeRule excludeRule = null) #

Parameters

Name
Type
Description
conditionName
String
excludeRule
ExcludeRule
public virtual void ExecuteAction(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter) #
Execute action

Parameters

Name
Type
Description
name
String
Name of the action to execute
processInstance
ProcessInstance
Reference to ProcessInstance from which action is executed ProcessInstance
runtime
WorkflowRuntime
Reference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
actionParameter
String
Additional action parameter ActionDefinitionReference.ActionParameter
public virtual Task ExecuteActionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token) #
Execute action asynchronously

Parameters

Name
Type
Description
name
String
Name of the action to execute
processInstance
ProcessInstance
Reference to ProcessInstance from which action is executed ProcessInstance
runtime
WorkflowRuntime
Reference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
actionParameter
String
Additional action parameter ActionDefinitionReference.ActionParameter
token
CancellationToken
Cancellation token

Returns

Type
Description
Task
public virtual bool ExecuteCondition(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter) #
Check condition

Parameters

Name
Type
Description
name
String
Name of the condition to check
processInstance
ProcessInstance
Reference to ProcessInstance from which condition is checked ProcessInstance
runtime
WorkflowRuntime
Reference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
actionParameter
String
Additional action parameter ActionDefinitionReference.ActionParameter

Returns

Type
Description
Boolean
Condition result
public virtual Task<bool> ExecuteConditionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token) #
Check condition asynchronously

Parameters

Name
Type
Description
name
String
Name of the condition to check
processInstance
ProcessInstance
Reference to ProcessInstance from which condition is checked ProcessInstance
runtime
WorkflowRuntime
Reference to WorkflowRuntime object which managed specified process instance WorkflowRuntime
actionParameter
String
Additional action parameter ActionDefinitionReference.ActionParameter
token
CancellationToken
Cancellation token

Returns

Type
Description
Task<Boolean>
Condition result
public virtual List<string> GetActions(string schemeCode, NamesSearchType namesSearchType) #
Return all user actions names

Parameters

Name
Type
Description
schemeCode
String
Scheme code
namesSearchType
NamesSearchType

Returns

Type
Description
List<String>
List of actions names
public virtual List<string> GetConditions(string schemeCode, NamesSearchType namesSearchType) #
Return all user conditions names

Parameters

Name
Type
Description
schemeCode
String
Scheme code
namesSearchType
NamesSearchType

Returns

Type
Description
List<String>
List of conditions names
public virtual bool IsActionAsync(string name, string schemeCode) #
Checks whether the action should be called asynchronously

Parameters

Name
Type
Description
name
String
Name of the action
schemeCode
String
Scheme code

Returns

Type
Description
Boolean
protected List<TEnumActionsAsync> GetActionsAsync(NamesSearchType namesSearchType) #

Parameters

Name
Type
Description
namesSearchType
NamesSearchType

Returns

Type
Description
List<TEnumActionsAsync>
protected List<TEnumActions> GetActions(NamesSearchType namesSearchType) #

Parameters

Name
Type
Description
namesSearchType
NamesSearchType

Returns

Type
Description
List<TEnumActions>
protected List<TEnumConditions> GetConditions(NamesSearchType namesSearchType) #

Parameters

Name
Type
Description
namesSearchType
NamesSearchType

Returns

Type
Description
List<TEnumConditions>
protected List<TEnumConditionsAsync> GetConditionsAsync(NamesSearchType namesSearchType) #

Parameters

Name
Type
Description
namesSearchType
NamesSearchType

Returns

Type
Description
List<TEnumConditionsAsync>
public virtual bool IsConditionAsync(string name, string schemeCode) #
Checks whether the condition should be called asynchronously

Parameters

Name
Type
Description
name
String
Name of the condition
schemeCode
String
Scheme code

Returns

Type
Description
Boolean
protected virtual Dictionary<string, string> ToParameters(string actionParameter) #

Parameters

Name
Type
Description
actionParameter
String

Returns

Type
Description
Dictionary<String>
protected virtual Task<Dictionary<string, string>> ToParametersAsync(string actionParameter, ProcessInstance processInstance) #

Parameters

Name
Type
Description
actionParameter
String
processInstance
ProcessInstance

Returns

Type
Description
Task<String>