Class SubprocessNameGetterInvoker
OptimaJet.Workflow.Core.CodeActions.SubprocessNameGetterInvoker
Evaluates configured TransitionDefinition.SubprocessName values for process transitions.
Namespace: OptimaJet.Workflow.Core.CodeActions
public sealed class SubprocessNameGetterInvoker : FunctionInvoker<string>Type Hierarchy
- FunctionInvoker<string>
- SubprocessNameGetterInvoker Current type
Properties
protected override FunctionInvoker<string>.InvokerNotFoundReactionType InvokerNotFoundReaction { get; } #Gets the behavior applied by the FunctionInvoker<TReturn>.InvokeAsync(TransitionDefinition, ProcessInstance) 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<string> GetSubprocessNameAsync(TransitionDefinition transition, ProcessInstance processInstance) #Gets a subprocess name for the specified
transition and processInstance.Parameters
Name
Type
Description
transitionTransitionDefinitionThe transition whose TransitionDefinition.Name identifies the registered subprocess-name function.
processInstanceProcessInstanceThe process instance supplied to the registered function.
Returns
Type
Description
Task<String>The evaluated subprocess name, or TransitionDefinition.Name when no function is registered or the function returns 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
transitionTransitionDefinitionThe transition whose subprocess name is requested.
processInstanceProcessInstanceThe process instance supplied to the registered function.
Returns
Type
Description
StringThe same subprocess name produced by SubprocessNameGetterInvoker.GetSubprocessNameAsync(TransitionDefinition, ProcessInstance).
Exceptions
Type
Description
AggregateExceptionThrown when asynchronous subprocess-name evaluation fails.
Remarks
The inherited InvokeAsync(string, ProcessInstance) method returns null when a transition has no registered function. SubprocessNameGetterInvoker.GetSubprocessNameAsync(TransitionDefinition, ProcessInstance) and SubprocessNameGetterInvoker.GetSubprocessName(TransitionDefinition, ProcessInstance) replace that result with the transition name.