Assembly: OptimaJet.Workflow.Core

Class SubprocessNameGetterInvoker

OptimaJet.Workflow.Core.CodeActions.SubprocessNameGetterInvoker

Evaluates configured TransitionDefinition.SubprocessName values for process transitions.

public sealed class SubprocessNameGetterInvoker : FunctionInvoker<string>

Type Hierarchy

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
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<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
transition
TransitionDefinition
The transition whose subprocess name is requested.
processInstance
ProcessInstance
The process instance supplied to the registered function.

Returns

Exceptions

Type
Description
AggregateException
Thrown 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.