Table of Contents

Class VerifyAndAddComponentScan

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

An activity that verifies and records a component scan for the unit at the workstation.

public class VerifyAndAddComponentScan : Activity<ComponentStatus>, IActivity
Inheritance
VerifyAndAddComponentScan
Implements
Inherited Members

Remarks

The result value will be the result of VerifyAndAddComponentScanAsync(string, string, string).

Depending on the "allowInvalid" setting for the line, this might or might not throw a a business logic exception upon the component being rejected.

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

Properties

ComponentModelNumber

Gets or sets the component model number. This is optional if ComponentSerialNumber is specified.

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

Property Value

ValueSource<string>

ComponentSerialNumber

Gets or sets the component serial number. This is optional if ComponentModelNumber is specified.

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

Property Value

ValueSource<string>

ComponentTypeName

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

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

Property Value

ValueSource<string>

Methods

OnExecuteAsync(ActivityContext, CancellationToken)

Derived classes must implement this to perform the activity.

protected override Task<ComponentStatus> OnExecuteAsync(ActivityContext context, CancellationToken cancellationToken)

Parameters

context ActivityContext

The activity context.

cancellationToken CancellationToken

The cancellation token used to request canceling the activity.

Returns

Task<ComponentStatus>

A task that represents the asynchronous operation. The value of its Result property contains the result.

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.