# Class AggregatingExternalParametersProvider OptimaJet.Workflow.Core.Runtime.AggregatingExternalParametersProvider Combines registered [IWorkflowExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) implementations into one provider and routes external parameter operations by parameter ownership and access mode. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public class AggregatingExternalParametersProvider : BaseAggregatingProvider, IWorkflowExternalParametersProvider ``` ## Type Hierarchy - [BaseAggregatingProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/BaseAggregatingProvider-T/) - AggregatingExternalParametersProvider Current type - Implemented interfaces - [IWorkflowExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) ## Methods `public Task GetExternalParameterAsync(string parameterName, ProcessInstance processInstance)` Gets the value of the named external parameter asynchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `parameterName` | `String` | The external parameter name. | | `processInstance` | `ProcessInstance` | The workflow process instance for which the parameter is requested. | ### Returns | Type | Description | | --- | --- | | `Task` | The asynchronous result containing the external parameter value. | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown synchronously when no applicable provider both recognizes the parameter and reports asynchronous reads. | ### Remarks The runtime calls this method when [IWorkflowExternalParametersProvider.IsGetExternalParameterAsync(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) for the same parameter and scheme combination. `public object GetExternalParameter(string parameterName, ProcessInstance processInstance)` Gets the value of the named external parameter synchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `parameterName` | `String` | The external parameter name. | | `processInstance` | `ProcessInstance` | The workflow process instance for which the parameter is requested. | ### Returns | Type | Description | | --- | --- | | `Object` | The external parameter value. | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown when no applicable provider both recognizes the parameter and reports synchronous reads. | ### Remarks The runtime calls this method when [IWorkflowExternalParametersProvider.IsGetExternalParameterAsync(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) for the same parameter and scheme combination. `public Task SetExternalParameterAsync(string parameterName, object parameterValue, ProcessInstance processInstance)` Writes the named external parameter value asynchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `parameterName` | `String` | The external parameter name. | | `parameterValue` | `Object` | The value to write. | | `processInstance` | `ProcessInstance` | The workflow process instance for which the parameter is updated. | ### Returns | Type | Description | | --- | --- | | `Task` | A task that completes when the parameter value is written. | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown synchronously when no applicable provider both recognizes the parameter and reports asynchronous writes. | ### Remarks The runtime calls this method when [IWorkflowExternalParametersProvider.IsSetExternalParameterAsync(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) for the same parameter and scheme combination. `public void SetExternalParameter(string parameterName, object parameterValue, ProcessInstance processInstance)` Writes the named external parameter value synchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `parameterName` | `String` | The external parameter name. | | `parameterValue` | `Object` | The value to write. | | `processInstance` | `ProcessInstance` | The workflow process instance for which the parameter is updated. | ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | Thrown when no applicable provider both recognizes the parameter and reports synchronous writes. | ### Remarks The runtime calls this method when [IWorkflowExternalParametersProvider.IsSetExternalParameterAsync(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) for the same parameter and scheme combination. `public bool IsGetExternalParameterAsync(string parameterName, string schemeCode, ProcessInstance processInstance)` Checks whether asynchronous external-parameter reads are supported for the named parameter. ### Parameters | Name | Type | Description | | --- | --- | --- | | `parameterName` | `String` | The external parameter name. | | `schemeCode` | `String` | The scheme code for provider selection. | | `processInstance` | `ProcessInstance` | The workflow process instance used for context checks. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if [IWorkflowExternalParametersProvider.GetExternalParameterAsync(string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) is supported. | ### Remarks Providers are queried from most recently registered to earliest until one returns [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). This method does not call [IWorkflowExternalParametersProvider.HasExternalParameter(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/). `public bool IsSetExternalParameterAsync(string parameterName, string schemeCode, ProcessInstance processInstance)` Checks whether asynchronous external-parameter writes are supported for the named parameter. ### Parameters | Name | Type | Description | | --- | --- | --- | | `parameterName` | `String` | The external parameter name. | | `schemeCode` | `String` | The scheme code for provider selection. | | `processInstance` | `ProcessInstance` | The workflow process instance used for context checks. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if [IWorkflowExternalParametersProvider.SetExternalParameterAsync(string, object, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) is supported. | ### Remarks Providers are queried from most recently registered to earliest until one returns [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). This method does not call [IWorkflowExternalParametersProvider.HasExternalParameter(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/). `public bool HasExternalParameter(string parameterName, string schemeCode, ProcessInstance processInstance)` Checks whether the named external parameter exists in this provider for the scheme and process context. ### Parameters | Name | Type | Description | | --- | --- | --- | | `parameterName` | `String` | The external parameter name. | | `schemeCode` | `String` | The scheme code for provider selection. | | `processInstance` | `ProcessInstance` | The workflow process instance used for context checks. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the parameter is recognized by the provider. | ### Remarks Providers are queried from most recently registered to earliest until one returns [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). ## 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. A read or write is forwarded to the first provider that recognizes the parameter and whose synchronous or asynchronous mode matches the method being called. Providers with a different access mode are skipped. [AggregatingExternalParametersProvider.HasExternalParameter(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingExternalParametersProvider/), [AggregatingExternalParametersProvider.IsGetExternalParameterAsync(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingExternalParametersProvider/), and [AggregatingExternalParametersProvider.IsSetExternalParameterAsync(string, string, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingExternalParametersProvider/) are aggregate queries: each returns [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when any applicable provider returns [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). The asynchronous-mode queries do not first require the same provider to report that it recognizes the parameter. [Previous AggregatingDesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingDesignerParameterFormatProvider/) [Next AggregatingRuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingRuleProvider/)