Table of Contents

Class ScanComponent

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

An activity that prompts the operator to scan a component.

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

Remarks

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

This activity requires the IUnitAtStationService service (automatically provided by Acuit Pinpoint Workstation).

Properties

CancelUnitWorkflowIfNoSuccess

Gets or sets whether to cancel the unit workflow (i.e., the workflow executing in response to the "UnitLoaded" event) if a valid component scan does not occur and a valid previous component scan does not exist. This defaults to false.

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

Property Value

ValueSource<bool>

Remarks

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

ComponentTypeName

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

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

Property Value

ValueSource<string>

MergePreassembly

Gets or sets whether this component scan should merge an existing preassembly. This defaults to false.

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

Property Value

ValueSource<bool>

ShowSkip

Gets or sets whether to show a "Skip Component" button instead of a "Cancel" button in the component scan window. This defaults to false.

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

Property Value

ValueSource<bool>

SkipIfHaveValid

Gets or sets whether to skip this if there is already a valid scan for this component in the unit record. This defaults to false.

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

Property Value

ValueSource<bool>

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.