Table of Contents

Class WorkflowInvoker

Namespace
Acuit.Pinpoint.Workflows
Assembly
Acuit.Pinpoint.Workflows.dll

Provides static methods for invoking workflows.

public static class WorkflowInvoker
Inheritance
WorkflowInvoker
Inherited Members

Methods

InvokeAsync(IActivity, IParameterValueProvider, IServiceProvider, CancellationToken)

Invokes a workflow.

public static Task InvokeAsync(IActivity activity, IParameterValueProvider parameterValueProvider, IServiceProvider serviceProvider, CancellationToken cancellationToken = default)

Parameters

activity IActivity

The root workflow activity.

parameterValueProvider IParameterValueProvider

The parameter value provider for the workflow to use.

serviceProvider IServiceProvider

The service provider for the workflow to use.

cancellationToken CancellationToken

A token that can request canceling the workflow.

Returns

Task

A task that represents the asynchronous operation.

Exceptions

ArgumentNullException

activity is null.

ArgumentNullException

parameterValueProvider is null.

ArgumentNullException

serviceProvider is null.

WorkflowParameterException

An error occurred initializing parameter values within the workflow.

WorkflowException

An unhandled error occurred in the workflow. InnerException will contain the unhandled exception.

InvokeAsync(IActivity, IServiceProvider, CancellationToken)

Invokes a workflow.

public static Task InvokeAsync(IActivity activity, IServiceProvider serviceProvider, CancellationToken cancellationToken = default)

Parameters

activity IActivity

The root workflow activity.

serviceProvider IServiceProvider

The service provider for the workflow to use.

cancellationToken CancellationToken

A token that can request canceling the workflow.

Returns

Task

A task that represents the asynchronous operation.

Exceptions

ArgumentNullException

activity is null.

ArgumentNullException

serviceProvider is null.

WorkflowParameterException

An error occurred initializing parameter values within the workflow.

WorkflowException

An unhandled error occurred in the workflow. InnerException will contain the unhandled exception.

InvokeAsync<TResult>(Activity<TResult>, IParameterValueProvider, IServiceProvider, CancellationToken)

Invokes a workflow.

public static Task<TResult> InvokeAsync<TResult>(Activity<TResult> activity, IParameterValueProvider parameterValueProvider, IServiceProvider serviceProvider, CancellationToken cancellationToken = default)

Parameters

activity Activity<TResult>

The root workflow activity.

parameterValueProvider IParameterValueProvider

The parameter value provider for the workflow to use.

serviceProvider IServiceProvider

The service provider for the workflow to use.

cancellationToken CancellationToken

A token that can request canceling the workflow.

Returns

Task<TResult>

A task that represents the asynchronous operation. The value of its Result property contains the result returned by the root workflow activity.

Type Parameters

TResult

The type of the result that the workflow root activity produces.

Exceptions

ArgumentNullException

activity is null.

ArgumentNullException

parameterValueProvider is null.

ArgumentNullException

serviceProvider is null.

WorkflowParameterException

An error occurred initializing parameter values within the workflow.

WorkflowException

An unhandled error occurred in the workflow. InnerException will contain the unhandled exception.

InvokeAsync<TResult>(Activity<TResult>, IServiceProvider, CancellationToken)

Invokes a workflow.

public static Task<TResult> InvokeAsync<TResult>(Activity<TResult> activity, IServiceProvider serviceProvider, CancellationToken cancellationToken = default)

Parameters

activity Activity<TResult>

The root workflow activity.

serviceProvider IServiceProvider

The service provider for the workflow to use.

cancellationToken CancellationToken

A token that can request canceling the workflow.

Returns

Task<TResult>

A task that represents the asynchronous operation. The value of its Result property contains the result returned by the root workflow activity.

Type Parameters

TResult

The type of the result that the workflow root activity produces.

Exceptions

ArgumentNullException

activity is null.

ArgumentNullException

serviceProvider is null.

WorkflowParameterException

An error occurred initializing parameter values within the workflow.

WorkflowException

An unhandled error occurred in the workflow. InnerException will contain the unhandled exception.