Class WorkflowActionProvider<TEnumActions, TEnumActionsAsync, TEnumConditions, TEnumConditionsAsync>
OptimaJet.Workflow.Plugins.CustomWorkflowProviders.WorkflowActionProvider<TEnumActions, TEnumActionsAsync, TEnumConditions, TEnumConditionsAsync>
Namespace: OptimaJet.Workflow.Plugins.CustomWorkflowProviders
public abstract class WorkflowActionProvider<TEnumActions, TEnumActionsAsync, TEnumConditions, TEnumConditionsAsync> : ICustomWorkflowActionProvider, IWorkflowActionProvider, IDisableProvider where TEnumActions : struct where TEnumActionsAsync : struct where TEnumConditions : struct where TEnumConditionsAsync : structType Hierarchy
- WorkflowActionProvider<TEnumActions, TEnumActionsAsync, TEnumConditions, TEnumConditionsAsync> Current type
- WorkflowActionAndDesignerParameterFormatProvider<TEnumActions, TEnumActionsAsync, TEnumConditions, TEnumConditionsAsync>
- Implemented interfaces
Constructors
public WorkflowActionProvider() #Properties
public abstract bool Disabled { get; set; } #protected Dictionary<TEnumActions, ActionDelegate> Actions { get; } #protected Dictionary<TEnumActionsAsync, ActionAsyncDelegate> ActionsAsync { get; } #protected Dictionary<TEnumConditions, ConditionDelegate> Conditions { get; } #protected Dictionary<TEnumConditionsAsync, ConditionAsyncDelegate> ConditionsAsync { get; } #protected Dictionary<TEnumActions, string> ActionsDescriptions { get; } #protected Dictionary<TEnumActionsAsync, string> ActionsAsyncDescriptions { get; } #protected Dictionary<TEnumActionsAsync, string> ActionsAsyncTemplates { get; } #protected Dictionary<TEnumConditions, string> ConditionsDescriptions { get; } #protected Dictionary<TEnumConditionsAsync, string> ConditionsAsyncDescriptions { get; } #protected Dictionary<TEnumConditionsAsync, string> ConditionsAsyncTemplates { get; } #protected Dictionary<TEnumActions, ExcludeRule> ActionsExcludeRule { get; } #protected Dictionary<TEnumActionsAsync, ExcludeRule> ActionsAsyncExcludeRule { get; } #protected Dictionary<TEnumConditions, ExcludeRule> ConditionsExcludeRule { get; } #protected Dictionary<TEnumConditionsAsync, ExcludeRule> ConditionsAsyncExcludeRule { get; } #protected string ActionParameter { get; set; } #Methods
public void ExcludeAction(string actionName, ExcludeRule excludeRule = null) #Parameters
Name
Type
Description
actionNameStringexcludeRuleExcludeRulepublic void ExcludeCondition(string conditionName, ExcludeRule excludeRule = null) #Parameters
Name
Type
Description
conditionNameStringexcludeRuleExcludeRulepublic virtual void ExecuteAction(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter) #Executes an action.
Parameters
Name
Type
Description
nameStringName of the action to execute.
processInstanceProcessInstanceThe process instance from which the action is executed. ProcessInstance
public virtual Task ExecuteActionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token) #Executes an action asynchronously.
Parameters
Name
Type
Description
nameStringName of the action to execute.
processInstanceProcessInstanceThe process instance from which the action is executed. ProcessInstance
tokenCancellationTokenCancellation token.
Returns
Type
Description
TaskA task that represents the asynchronous operation.
public virtual bool ExecuteCondition(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter) #Executes a condition and returns the result.
Parameters
Name
Type
Description
nameStringName of the condition to check.
processInstanceProcessInstanceThe process instance from which the condition is checked. ProcessInstance
actionParameterStringAdditional condition parameter value. ActionDefinitionReference.ActionParameter
Returns
public virtual Task<bool> ExecuteConditionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token) #Executes a condition asynchronously and returns the result.
Parameters
Name
Type
Description
nameStringName of the condition to check.
processInstanceProcessInstanceThe process instance from which the condition is checked. ProcessInstance
actionParameterStringAdditional condition parameter value. ActionDefinitionReference.ActionParameter
tokenCancellationTokenCancellation token.
Returns
public virtual List<string> GetActions(string schemeCode, NamesSearchType namesSearchType) #Returns action names for a scheme.
Parameters
Name
Type
Description
schemeCodeStringCode of the scheme for which action names are requested.
namesSearchTypeNamesSearchTypeThe name selection strategy.
Returns
Type
Description
List<String>A list of action names.
public virtual List<string> GetConditions(string schemeCode, NamesSearchType namesSearchType) #Returns condition names for a scheme.
Parameters
Name
Type
Description
schemeCodeStringCode of the scheme for which condition names are requested.
namesSearchTypeNamesSearchTypeThe name selection strategy.
Returns
Type
Description
List<String>A list of condition names.
public virtual bool IsActionAsync(string name, string schemeCode) #Checks whether an action should be executed asynchronously.
protected List<TEnumActionsAsync> GetActionsAsync(NamesSearchType namesSearchType) #Parameters
Name
Type
Description
namesSearchTypeNamesSearchTypeReturns
Type
Description
List<TEnumActionsAsync>protected List<TEnumActions> GetActions(NamesSearchType namesSearchType) #Parameters
Name
Type
Description
namesSearchTypeNamesSearchTypeReturns
Type
Description
List<TEnumActions>protected List<TEnumConditions> GetConditions(NamesSearchType namesSearchType) #Parameters
Name
Type
Description
namesSearchTypeNamesSearchTypeReturns
Type
Description
List<TEnumConditions>protected List<TEnumConditionsAsync> GetConditionsAsync(NamesSearchType namesSearchType) #Parameters
Name
Type
Description
namesSearchTypeNamesSearchTypeReturns
Type
Description
List<TEnumConditionsAsync>public virtual bool IsConditionAsync(string name, string schemeCode) #Checks whether a condition should be evaluated asynchronously.
protected virtual Dictionary<string, string> ToParameters(string actionParameter) #Parameters
Name
Type
Description
actionParameterStringReturns
Type
Description
Dictionary<String, String>protected virtual Task<Dictionary<string, string>> ToParametersAsync(string actionParameter, ProcessInstance processInstance) #Parameters
Name
Type
Description
actionParameterStringprocessInstanceProcessInstanceReturns
Type
Description
Task<String, String>