# Class AggregatingActionProvider OptimaJet.Workflow.Core.Runtime.AggregatingActionProvider Combines registered [IWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowActionProvider/) implementations into one provider and resolves duplicate action and condition names by registration priority. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public class AggregatingActionProvider : BaseAggregatingProvider, IWorkflowActionProvider ``` ## Type Hierarchy - [BaseAggregatingProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/BaseAggregatingProvider-T/) - AggregatingActionProvider Current type - Implemented interfaces - [IWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowActionProvider/) ## Methods `public 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/) | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown when no applicable provider advertises the action or when the owning provider reports it as asynchronous. | ### Remarks The effective scheme code is obtained from `processInstance`. The call is forwarded to the owning provider only when that provider reports the action as synchronous. `public 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. | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown when no applicable provider advertises the action or when the owning provider reports it as synchronous. | ### Remarks The effective scheme code is obtained from `processInstance`. The call is forwarded to the owning provider only when that provider reports the action as asynchronous. `public 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). | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown when no applicable provider advertises the condition or when the owning provider reports it as asynchronous. | ### Remarks The effective scheme code is obtained from `processInstance`. The call is forwarded to the owning provider only when that provider reports the condition as synchronous. `public 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). | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown when no applicable provider advertises the condition or when the owning provider reports it as synchronous. | ### Remarks The effective scheme code is obtained from `processInstance`. The call is forwarded to the owning provider only when that provider reports the condition as asynchronous. `public 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). | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown when no applicable provider advertises the action. | ### Remarks Returns the value reported by the most recently registered applicable provider that advertises the action. `public 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). | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown when no applicable provider advertises the condition. | ### Remarks Returns the value reported by the most recently registered applicable provider that advertises the condition. `public 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. | ### Remarks Providers are queried from earliest to latest registration, and `namesSearchType` is passed through unchanged. When a name occurs more than once, its first occurrence is retained. `public 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 Providers are queried from earliest to latest registration, and `namesSearchType` is passed through unchanged. When a name occurs more than once, its first occurrence is retained. ## Remarks For a scheme, both global providers and providers registered specifically for that scheme are applicable. Providers are searched from the most recently registered to the earliest, regardless of registration scope. The first provider that advertises an action or condition name owns that name. The owning provider also determines whether the operation is synchronous or asynchronous. Calling the opposite execution method throws [NotImplementedException](https://learn.microsoft.com/dotnet/api/system.notimplementedexception); the aggregator does not fall back to an older provider that advertises the same name in the requested execution mode. [AggregatingActionProvider.GetActions(string, NamesSearchType)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingActionProvider/) and [AggregatingActionProvider.GetConditions(string, NamesSearchType)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingActionProvider/) are catalog operations rather than dispatch operations. They combine names from every applicable provider in earliest-to-latest registration order and remove duplicates, so their result order does not represent dispatch priority. [Previous ActorsApi](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/ActorsApi/) [Next AggregatingDesignerAutocompleteProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingDesignerAutocompleteProvider/)