Table of Contents

Class StartTestWorkflow

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

An activity that executes a test workflow.

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

Remarks

Only test types that are configured in the list of test types for the station type can be performed using this activity. If the test type does not apply to this unit, this activity will do nothing.

This activity requires the IAlarmsManager, IErrorHandler, and IUnitAtStationService, and IWorkstationStatusManager services (automatically provided by Acuit Pinpoint Workstation). If an ILogger<TCategoryName> service is available, it will use it to log details about workflow parameter errors.

Properties

CancelUnitWorkflowIfNoSuccess

Gets or sets whether to cancel the unit workflow (i.e., the workflow executing in response to the "UnitLoaded" event) if the workflow was not started successfully due to a test workflow parameter error, or, when WaitForCompletion is true, a passed test does not occur. This defaults to false.

public ValueSource<bool> CancelUnitWorkflowIfNoSuccess { get; set; }

Property Value

ValueSource<bool>

Remarks

Canceling the unit workflow causes a UnitWorkflowCanceledException to be thrown. If this exception isn't handled by the workflow, then Acuit Pinpoint Workstation will silently catch it.

TestTypeName

Gets or sets the test type name. This is required.

public ValueSource<string> TestTypeName { get; set; }

Property Value

ValueSource<string>

WaitForCompletion

Gets or sets whether to wait until the test workflow completes. This defaults to false.

public ValueSource<bool> WaitForCompletion { get; set; }

Property Value

ValueSource<bool>

Remarks

When this is true, it will set the workstation status to "Waiting for {TestTypeName} result..." while the workflow is executing.

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. This will only occur asynchronously, wrapped in an AggregateException as the faulted task's Exception.

Exception

An error occurred while performing the activity. This will only occur asynchronously, wrapped in an AggregateException as the faulted task's Exception.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Remarks

This is expected to produce a string suitable for labeling this activity in a workflow diagram. It should be as specific as possible, but while keeping it very short. In general, it should be the short name of the class (as that is how it would typically be defined in the workflow XAML), optionally followed by other property values of interest in a diagram. The default implementation returns the short name of the class.