# Class SubprocessNameGetterInvoker OptimaJet.Workflow.Core.CodeActions.SubprocessNameGetterInvoker Evaluates configured [TransitionDefinition.SubprocessName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionDefinition/) values for process transitions. Namespace: [OptimaJet.Workflow.Core.CodeActions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/) ```csharp public sealed class SubprocessNameGetterInvoker : FunctionInvoker ``` ## Type Hierarchy - [FunctionInvoker](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/FunctionInvoker-TReturn/) - SubprocessNameGetterInvoker Current type ## Properties `protected override FunctionInvoker.InvokerNotFoundReactionType InvokerNotFoundReaction { get; }` Gets the behavior applied by the [FunctionInvoker.InvokeAsync(TransitionDefinition, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/FunctionInvoker-TReturn/) methods when no function is registered for the requested transition. `public override string FunctionName { get; }` Gets the label included in compilation-error and missing-function messages. `public static string FunctionNameStatic { get; }` Gets the diagnostic label for subprocess-name functions. ## Methods `public Task GetSubprocessNameAsync(TransitionDefinition transition, ProcessInstance processInstance)` Gets a subprocess name for the specified `transition` and `processInstance`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `transition` | `TransitionDefinition` | The transition whose TransitionDefinition.Name identifies the registered subprocess-name function. | | `processInstance` | `ProcessInstance` | The process instance supplied to the registered function. | ### Returns | Type | Description | | --- | --- | | `Task` | The evaluated subprocess name, or TransitionDefinition.Name when no function is registered or the function returns [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | ### Remarks An empty string returned by a registered function is returned unchanged. `public string GetSubprocessName(TransitionDefinition transition, ProcessInstance processInstance)` Synchronously gets the subprocess name for the specified transition and process instance. ### Parameters | Name | Type | Description | | --- | --- | --- | | `transition` | `TransitionDefinition` | The transition whose subprocess name is requested. | | `processInstance` | `ProcessInstance` | The process instance supplied to the registered function. | ### Returns | Type | Description | | --- | --- | | `String` | The same subprocess name produced by [SubprocessNameGetterInvoker.GetSubprocessNameAsync(TransitionDefinition, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/SubprocessNameGetterInvoker/). | ### Exceptions | Type | Description | | --- | --- | | `AggregateException` | Thrown when asynchronous subprocess-name evaluation fails. | ## Remarks The inherited InvokeAsync(string, ProcessInstance) method returns [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when a transition has no registered function. [SubprocessNameGetterInvoker.GetSubprocessNameAsync(TransitionDefinition, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/SubprocessNameGetterInvoker/) and [SubprocessNameGetterInvoker.GetSubprocessName(TransitionDefinition, ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/SubprocessNameGetterInvoker/) replace that result with the transition name. [Previous RegexPattern.Groups](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/RegexPattern.Groups/) [Next SubstitutionsProcessor](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/SubstitutionsProcessor/)