Skip to content

SerialLinkedEvent

EventType: SERIAL_LINKEDDomain: serial Broker subject: progress.notification.serial

Links a child serial to a parent serial via the contains edge collection, optionally moving the child's inventory record from its current position and replacing an existing parent link.

Trigger

Triggered by: POST /event (universal event dispatcher)

Dispatched via POST /event in backend/api/endpoints/traceability.py with event_type: SERIAL_LINKED. Also spawned as a child event by BatchCompletedEvent when batch serials are linked to a parent assembly.

Preconditions

  • Child serial exists with key info.child_serial_key
  • Parent serial exists with key info.parent_serial_key (if provided)

State Changes (Transaction)

Collections: contains, is_in_position, movement, Serial

  • contains edge inserted linking child to parent
  • is_in_position record for child serial updated or moved
  • movement record inserted if inventory movement is processed
  • Existing contains edge replaced if replace_existing is true

Side Effects (post_processing)

Inherits post_processing() from BaseSerialEvent:

  • Publishes to progress.notification.serial

InfoModel Fields

FieldTypeDescription
child_serial_keystrArangoDB key of the child serial
parent_serial_keystr | NoneArangoDB key of the parent serial
wo_keystr | NoneWork order key for context
component_keystr | NoneBOM component key
batch_keystr | NoneBatch key for context
phase_keystr | NonePhase key for context
job_keystr | NoneJob key for context
process_inventorybool | NoneWhether to move inventory when linking
replace_existingbool | NoneWhether to replace an existing parent link

None.

Source

SerialLinkedEvent on GitHub

Released under the Apache 2.0 License.