Skip to main content

How a pick becomes a task

What this shows. What happens between the press of Release on an order and a pick task that waits in the pool.

Reading the diagram​

  • The task is created by the same transaction that releases the order. A person does not type it in.
  • The gate is shipment_order.released_at. An Allocate on an order that is not released reserves stock and makes no task. When the order is released later, the same function runs again and makes the missing tasks.
  • A second Release on a released order (release_again) runs the same allocation step again. The picks that still have no task get one.
  • A pick that already has a task is skipped. A live task for the same source is found and reused. A task that does not match the pick refuses with SourceTaskSnapshotConflict.
  • ShipAsIs only counts as ready when the factory package proof is complete. Planned needs a carton id. Otherwise the pick is refused with a business error and the allocation step fails as a whole. Release then keeps the release and reports auto_allocation_error.

What the task copies from the pick​

Task fieldValueTask Board column
sourcepick_detail and the pick idnone (the board shows the order only to the delete action)
from_locationthe pick locationFrom; its zone is Zone and decides the work area
to_locationthe Picking To Location of the zone of the pick locationTo
owner, SKU, lot, unit, quantity, containerthe pickSKU, Lot, Qty, UOM
weightstock weight of the quantity (empty when no weight is known)none
prioritythe order priority (1 to 99, default 50, smaller is sooner)Priority
wave_idthe active wave claim of the order, if anynone. Stored on the task. No dispatch rule reads it

Where it comes from​

WhatSource
Release sets released_at, then runs the allocation halfcrates/libs/wms-outbound/src/service/order/release.rs:173-290
Release againcrates/libs/wms-outbound/src/service/order/release.rs:292-330
Allocation runs inside a savepointcrates/libs/wms-outbound/src/service/order/release.rs:354-380
Cartonization right after reservingcrates/libs/wms-outbound/src/service/order/allocate.rs:398-406
Task generation only when the order is releasedcrates/libs/wms-outbound/src/service/order/allocate.rs:408-440
Which cartonization outcomes are executablecrates/libs/wms-outbound/src/cartonization/handoff.rs:27-67
The task draft, zone destination, weightcrates/libs/wms-outbound/src/picking/infrastructure/tasks.rs:21-85
Task created, pick set to Releasedcrates/libs/wms-outbound/src/picking/infrastructure/tasks.rs:88-146
One live task per source, advisory lock, reusecrates/libs/wms-tasks/src/service/draft.rs:185-238
Wave id read from the wave claimcrates/libs/wms-outbound/src/waves/task_grouping.rs:9-19
Order priority range and defaultcrates/libs/wms-lib-sql/sql/wms-app/migrations/001_baseline.sql:5785
API methoddocs-obsidian/user-guide/api/openrpc.json (shipment_order_release)