# Interface IWorkflowExternalParametersProvider OptimaJet.Workflow.Core.Runtime.IWorkflowExternalParametersProvider Provides access to workflow external parameters for a specific process instance. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public interface IWorkflowExternalParametersProvider ``` ## Type Hierarchy - IWorkflowExternalParametersProvider Current type - Implementing types - [AggregatingExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingExternalParametersProvider/) - [EmptyWorkflowExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/EmptyWorkflowExternalParametersProvider/) ## Methods `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. | ### 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. `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. | ### 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. `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. | ### 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. `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. | ### 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. `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. | `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. | `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. | [Previous IWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowActionProvider/) [Next IWorkflowRuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowRuleProvider/)