Skip to content

CountCompletedEvent

EventType: COUNT_COMPLETEDDomain: inventory Broker subject: progress.notification.inventory

Marks a single count record as completed by recording the counted quantity, optional serial keys, and notes. Updates the is_in_position lock state and writes a inventory_count_position_complete record.

Trigger

Triggered by: POST /event (universal event dispatcher)

Dispatched via POST /event in backend/api/endpoints/traceability.py with event_type: COUNT_COMPLETED.

Preconditions

  • Count record exists with key info.count_key

State Changes (Transaction)

Collections: inventory_count_record, is_in_position, inventory_count_position_complete

  • inventory_count_record updated: count_qt, count_serial_keys, notes, completed
  • inventory_count_position_complete record inserted to mark position as counted
  • is_in_position lock status updated

Side Effects (post_processing)

Inherits post_processing() from BaseInventoryEvent:

  • Publishes to progress.notification.inventory

InfoModel Fields

FieldTypeDescription
count_keystrArangoDB key of the count record
count_qtfloatQuantity counted
count_serial_keyslist[str] | NoneSerial keys counted at this position
notesstr | NoneOperator notes for the count

None.

Source

CountCompletedEvent on GitHub

Released under the Apache 2.0 License.