# Class WorkflowActionProvider OptimaJet.Workflow.Plugins.CustomWorkflowProviders.WorkflowActionProvider Namespace: [OptimaJet.Workflow.Plugins.CustomWorkflowProviders](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/) ```csharp public abstract class WorkflowActionProvider : ICustomWorkflowActionProvider, IWorkflowActionProvider, IDisableProvider where TEnumActions : struct where TEnumActionsAsync : struct where TEnumConditions : struct where TEnumConditionsAsync : struct ``` ## Type Hierarchy - WorkflowActionProvider Current type - [WorkflowActionAndDesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowActionAndDesignerParameterFormatProvider-TEnumActions-TEnumActionsAsync-TEnumConditions-TEnumConditionsAsync/) - [CustomMixProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/CustomMixProvider-EnumActions-EnumActionsAsync-EnumConditions-EnumConditionsAsync/) - [CompressProvider](https://api.workflowengine.io/files-plugin/OptimaJet.Workflow.Plugins.FilesPlugin.CompressProvider/CompressProvider/) - [DirectoryFTPProvider](https://api.workflowengine.io/files-plugin/OptimaJet.Workflow.Plugins.FilesPlugin.SFTPProvider.DirectoryFTPProvider/DirectoryFTPProvider/) - [DirectoryProvider](https://api.workflowengine.io/files-plugin/OptimaJet.Workflow.Plugins.FilesPlugin.DirectoryProvider/DirectoryProvider/) - [FileFTPProvider](https://api.workflowengine.io/files-plugin/OptimaJet.Workflow.Plugins.FilesPlugin.SFTPProvider.FileFTPProvider/FileFTPProvider/) - [FileProvider](https://api.workflowengine.io/files-plugin/OptimaJet.Workflow.Plugins.FilesPlugin.FileProvider/FileProvider/) - [ListFilesProvider](https://api.workflowengine.io/files-plugin/OptimaJet.Workflow.Plugins.FilesPlugin.ListFilesProvider/ListFilesProvider/) - [WorkflowPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowPlugin-TEnumActions-TEnumActionsAsync-TEnumConditions-TEnumConditionsAsync/) - [ApprovalPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/ApprovalPlugin/) - [LoopPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/LoopPlugin/) - [WorkflowPluginWithRuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowPluginWithRuleProvider-EnumActions-EnumActionsAsync-EnumConditions-EnumConditionsAsync-EnumRules-EnumRulesAsync/) - [BasicPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/BasicPlugin/) - Implemented interfaces - [ICustomWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/ICustomWorkflowActionProvider/) - [IDisableProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/IDisableProvider/) - [IWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowActionProvider/) ## Constructors `public WorkflowActionProvider()` ## Properties `public abstract bool Disabled { get; set; }` `protected Dictionary Actions { get; }` `protected Dictionary ActionsAsync { get; }` `protected Dictionary Conditions { get; }` `protected Dictionary ConditionsAsync { get; }` `protected Dictionary ActionsDescriptions { get; }` `protected Dictionary ActionsAsyncDescriptions { get; }` `protected Dictionary ActionsAsyncTemplates { get; }` `protected Dictionary ConditionsDescriptions { get; }` `protected Dictionary ConditionsAsyncDescriptions { get; }` `protected Dictionary ConditionsAsyncTemplates { get; }` `protected Dictionary ActionsExcludeRule { get; }` `protected Dictionary ActionsAsyncExcludeRule { get; }` `protected Dictionary ConditionsExcludeRule { get; }` `protected Dictionary ConditionsAsyncExcludeRule { get; }` `protected string ActionParameter { get; set; }` ## 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)` Executes an action. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | Name of the action to execute. | | `processInstance` | `ProcessInstance` | The process instance from which the action is executed. [ProcessInstance](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/) | | `runtime` | `WorkflowRuntime` | The runtime instance that manages the process instance. [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) | | `actionParameter` | `String` | Additional action parameter value. [ActionDefinitionReference.ActionParameter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActionDefinitionReference/) | `public virtual Task ExecuteActionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token)` Executes an action asynchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | Name of the action to execute. | | `processInstance` | `ProcessInstance` | The process instance from which the action is executed. [ProcessInstance](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/) | | `runtime` | `WorkflowRuntime` | The runtime instance that manages the process instance. [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) | | `actionParameter` | `String` | Additional action parameter value. [ActionDefinitionReference.ActionParameter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActionDefinitionReference/) | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | A 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 | | --- | --- | --- | | `name` | `String` | Name of the condition to check. | | `processInstance` | `ProcessInstance` | The process instance from which the condition is checked. [ProcessInstance](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/) | | `runtime` | `WorkflowRuntime` | The runtime instance that manages the process instance. [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) | | `actionParameter` | `String` | Additional condition parameter value. [ActionDefinitionReference.ActionParameter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActionDefinitionReference/) | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the condition evaluates to true; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public virtual Task ExecuteConditionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token)` Executes a condition asynchronously and returns the result. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | Name of the condition to check. | | `processInstance` | `ProcessInstance` | The process instance from which the condition is checked. [ProcessInstance](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/) | | `runtime` | `WorkflowRuntime` | The runtime instance that manages the process instance. [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) | | `actionParameter` | `String` | Additional condition parameter value. [ActionDefinitionReference.ActionParameter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActionDefinitionReference/) | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | A task that resolves to [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the condition evaluates to true; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public virtual List GetActions(string schemeCode, NamesSearchType namesSearchType)` Returns action names for a scheme. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | Code of the scheme for which action names are requested. | | `namesSearchType` | `NamesSearchType` | The name selection strategy. | ### Returns | Type | Description | | --- | --- | | `List` | A list of action names. | `public virtual List GetConditions(string schemeCode, NamesSearchType namesSearchType)` Returns condition names for a scheme. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | Code of the scheme for which condition names are requested. | | `namesSearchType` | `NamesSearchType` | The name selection strategy. | ### Returns | Type | Description | | --- | --- | | `List` | A list of condition names. | `public virtual bool IsActionAsync(string name, string schemeCode)` Checks whether an action should be executed asynchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | Name of the action. | | `schemeCode` | `String` | Code of the scheme that the action belongs to. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the action is asynchronous; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `protected List GetActionsAsync(NamesSearchType namesSearchType)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `namesSearchType` | `NamesSearchType` | | ### Returns | Type | Description | | --- | --- | | `List` | | `protected List GetActions(NamesSearchType namesSearchType)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `namesSearchType` | `NamesSearchType` | | ### Returns | Type | Description | | --- | --- | | `List` | | `protected List GetConditions(NamesSearchType namesSearchType)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `namesSearchType` | `NamesSearchType` | | ### Returns | Type | Description | | --- | --- | | `List` | | `protected List GetConditionsAsync(NamesSearchType namesSearchType)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `namesSearchType` | `NamesSearchType` | | ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual bool IsConditionAsync(string name, string schemeCode)` Checks whether a condition should be evaluated asynchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | Name of the condition. | | `schemeCode` | `String` | Code of the scheme that the condition belongs to. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the condition is asynchronous; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `protected virtual Dictionary ToParameters(string actionParameter)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `actionParameter` | `String` | | ### Returns | Type | Description | | --- | --- | | `Dictionary` | | `protected virtual Task> ToParametersAsync(string actionParameter, ProcessInstance processInstance)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `actionParameter` | `String` | | | `processInstance` | `ProcessInstance` | | ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous WorkflowActionAndDesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowActionAndDesignerParameterFormatProvider-TEnumActions-TEnumActionsAsync-TEnumConditions-TEnumConditionsAsync/) [Next WorkflowPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowPlugin-TEnumActions-TEnumActionsAsync-TEnumConditions-TEnumConditionsAsync/)