Skip to content

WIPRemovedEvent

EventType: WIP_REMOVEDDomain: wip Broker subject: progress.notification.production

Removes a quantity of WIP from a job, reducing the wip records by the given amount. Used when material is consumed, rejected, or when a batch completion removes the WIP that was declared for the phase.

Trigger

Triggered by: POST /event (universal event dispatcher)

Spawned as a child event by BatchCompletedEvent in backend/api/events/production/batch_completed.py when WIP is consumed by batch completion.

Preconditions

  • Job exists with key info.job_key
  • Sufficient WIP quantity exists to subtract

State Changes (Transaction)

Collections: Inherited from BaseProductionEvent.get_tx_collections()

  • wip records reduced by info.quantity; records fully consumed are deleted

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
job_keystrArangoDB key of the job
quantityintQuantity of WIP to remove

None.

Source

WIPRemovedEvent on GitHub

Released under the Apache 2.0 License.