Class InitiateUnitSelectionMessage
- Namespace
- Acuit.Pinpoint.Workstation.Messaging
- Assembly
- Acuit.Pinpoint.Workstation.Abstractions.dll
The message raised by the IMessenger service to start selecting a unit with which to work at the workstation.
public class InitiateUnitSelectionMessage : WorkstationRequestMessage<IDisposable>, IWorkstationRequestMessage
- Inheritance
-
InitiateUnitSelectionMessage
- Implements
- Inherited Members
Remarks
This message will be raised each time the workstation needs to select a unit, such as when the workstation starts and the worker has logged on, or when a previous unit is released. By default, Acuit Pinpoint Workstation will handle this message when a worker is logged on and no unit is at the station by initiating unit selection via the built-in unit scanning user interface, as appropriate for the station type settings. If no worker is logged on or a unit is at the station, Acuit Pinpoint Workstation will ignore this message.
When unit selection is initiated, the message Response will contain an IDisposable that represents the active unit selection process. This will be disposed when unit selection is complete, either because a unit was selected or because unit selection was canceled (e.g., the worker logged out).
If a plug-in handles this message, then the default unit scanning user interface is not shown and the plug-in must handle selecting a unit.
Custom implementations should behave as follows:
- The method should apply the provided UnitSelectorSeedData initial seed data, if possible.
- The method should return an IDisposable that represents the active unit selection process. This disposable will be disposed when unit selection is complete, either because a unit was selected or because unit selection was canceled (e.g., the worker logged out).
- The method can throw InvalidOperationException if a unit selection cannot be initiated for some reason (e.g., a configuration issue). If this happens, the exception details will be logged, an alarm will be raised with the exception message as the alarm text, and the workstation workflow will be stopped.
- The unit selector should normally use IWorkstationStatusManager to indicate states during unit selection. For example, the default unit selector displays a "Waiting for bar code scan..." status message.
- During selection, if a unit scan error occurs, the unit selector should raise a UnitScanErrorMessage message.
- Once the unit information has been obtained (e.g., from one or more barcode scans), the unit selector should use one of the IWorkerAtStation unit-selection methods to select the unit. The active IWorkerAtStation can be obtained via the IWorkstationState service.
A plug-in can customize the default behavior by registering a recipient for this message. To suppress the default behavior, the plug-in should use Reply(T) to set the response to the message.
A plug-in can emulate the operator action that this message represents by sending this message.
Constructors
InitiateUnitSelectionMessage(UnitSelectorSeedData)
Initializes a new instance of the InitiateUnitSelectionMessage class.
public InitiateUnitSelectionMessage(UnitSelectorSeedData seedData)
Parameters
seedDataUnitSelectorSeedDataInitial seed data for unit selection.
Properties
SeedData
Gets the initial seed data for unit selection.
public UnitSelectorSeedData SeedData { get; }