Skip to content

BatchReleasedEvent

EventType: BATCH_RELEASEDDomain: production Broker subject: progress.notification.production

Records the release of a completed batch to a downstream phase or shipping, linking the batch with its product, work order, released quantity, and optional serial keys. This is a lightweight event with no transaction write collections beyond Event.

Trigger

Triggered by: POST /event (universal event dispatcher)

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

Preconditions

  • Batch exists with key info.batch_key

State Changes (Transaction)

Collections: [] (no collection writes beyond event log; BatchReleasedEvent.get_tx_collections() returns an empty list)

  • Event record stored in the event log

Side Effects (post_processing)

BatchReleasedEvent overrides _notification_subtopic = "production" directly. Publishes to progress.notification.production after commit.

InfoModel Fields

FieldTypeDescription
batch_keystrArangoDB key of the batch being released
product_keystrArangoDB key of the product
work_order_keystrArangoDB key of the work order
qt_releasedfloatQuantity released
serial_keyslist[str] | NoneSerial keys included in the release

None.

Source

BatchReleasedEvent on GitHub

Released under the Apache 2.0 License.