Skip to content

WorkSessionCanceledEvent

EventType: WORK_SESSION_CANCELEDDomain: work_session Broker subject: progress.notification.production

Cancels a work session, marking it as canceled without recording a normal end. Used in administrative corrections when a session must be voided — for example during a job reset or when a session was opened in error.

Trigger

Triggered by: POST /event (universal event dispatcher)

Dispatched via POST /event in backend/api/endpoints/traceability.py with event_type: WORK_SESSION_CANCELED. Also spawned internally by admin event flows that cancel all open sessions for a job.

Preconditions

  • WorkSession exists with key info.work_session_key

State Changes (Transaction)

Collections: Inherited from BaseProductionEvent.get_tx_collections()

  • WorkSession updated: canceled → event_key, active → false

Side Effects (post_processing)

Inherits post_processing() from BaseProductionEvent:

  • Updates job.last_online
  • Recalculates work order status
  • Publishes to progress.notification.production

InfoModel Fields

FieldTypeDescription
work_session_keystrArangoDB key of the work session to cancel

None.

Source

WorkSessionCanceledEvent on GitHub

Released under the Apache 2.0 License.