Table of Contents

Class WhenAny

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

An activity that runs multiple activities in parallel, completing as soon as any of the activities completes or fails (i.e., throws an exception). Other activities still running will be canceled.

public class WhenAny : Activity, IActivity
Inheritance
WhenAny
Implements
Inherited Members

Properties

Activities

public Collection<IActivity> Activities { get; }

Property Value

Collection<IActivity>

Methods

OnExecuteAsync(ActivityContext, CancellationToken)

Derived classes must implement this to perform the activity.

protected override Task OnExecuteAsync(ActivityContext context, CancellationToken cancellationToken)

Parameters

context ActivityContext

The activity context.

cancellationToken CancellationToken

The cancellation token used to request canceling the activity.

Returns

Task

A task that represents the asynchronous operation.

Exceptions

ArgumentNullException

context is null.

InvalidOperationException

A service required by the activity is not available, or a required activity property value is not set.

Exception

An error occurred while performing the activity.