# Interface IWorkflowActionProvider OptimaJet.Workflow.Core.Runtime.IWorkflowActionProvider Provides workflow actions and conditions from runtime definitions. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public interface IWorkflowActionProvider ``` ## Type Hierarchy - IWorkflowActionProvider Current type - Derived interfaces - [ICustomWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/ICustomWorkflowActionProvider/) - [ICustomMixProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/ICustomMixProvider/) - Implementing types - [ActiveDirectoryActionProvider](https://api.workflowengine.io/active-directory-plugin/OptimaJet.Workflow.Plugins.ActiveDirectoryPlugin.Providers/ActiveDirectoryActionProvider/) - [AggregatingActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingActionProvider/) - [BpmnActionProvider](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Providers/BpmnActionProvider/) - [DeactivatedWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/DeactivatedWorkflowActionProvider/) - [EmptyWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/EmptyWorkflowActionProvider/) - [ProviderProviders](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/ProviderProviders-TEnumProviders/) - [FilePlugin](https://api.workflowengine.io/files-plugin/OptimaJet.Workflow.Plugins/FilePlugin/) - [FTPProvider](https://api.workflowengine.io/files-plugin/OptimaJet.Workflow.Plugins.FilesPlugin.FTPProvider/FTPProvider/) - [WorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowActionProvider-TEnumActions-TEnumActionsAsync-TEnumConditions-TEnumConditionsAsync/) - [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/) ## Methods `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/) | `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. | `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). | `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). | `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). | `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). | `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. | `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. | ## Remarks Implementations execute actions defined in [ActivityDefinition.Implementation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActivityDefinition/) and [ActivityDefinition.PreExecutionImplementation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ActivityDefinition/) and evaluate conditions referenced by [ConditionDefinition.Action](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ConditionDefinition/). [Previous ITimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/ITimerManager/) [Next IWorkflowExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/)