Interfaces
How does the contract for “confirm pick” distinguish a repetition from a new intention?
The load profile meets the specific change request “confirm pick”. Its contents consist of order, storage location, allocated quantity, actual number of pieces and scan record. An idempotency key detects the same intention after a loss of response; an aggregate version protects the changed business state.
Starting point The last item determines the conflict test.
Assumptions for the example case
Own fictitious example design. A warehouse with integer quantities, manual picking and a heuristic route recommendation. A route plan is marked as requiring rechecking at age 60 seconds and older; confirmed picks remain valid evidence. All figures and test goals are illustrative assumptions.
Commands, retries and current state
Command and replay
Identical content returns the same record; changed content produces a conflict.
Proposed API for this example
- POST
/lagererfuellung/{id}/commandsConfirm a pick.
- Input
- Order, storage location, assigned quantity, actual number of pieces and scan record; expected aggregate version, authorized role and stable command key.
- Result
- Durably stored business result and new version; version or content conflicts produce no partial effects. An accepted external request receives an open status.
- Retry behaviour
- The key is scoped to the actor, operation and business object. After authentication, first compare the existing result and canonical content: identical content returns the stored evidence; changed content produces a conflict. Only new keys trigger validation of the current version.
- GET
/lagererfuellung/{id}Read the current business state and reason for investigation.
- Input
- Authorised identity and business object.
- Result
- Picking order with current version, proofs and open processing reason.
- Retry behaviour
- Repeating a read creates no business change; access is checked again.
Additional state changes
| Operation | Input | Result and protection |
|---|---|---|
| Quantity allocated | Order planning, article, storage location, whole positive number of pieces | Atomically check stock minus open allocations and reserve the quantity. |
| Notification of missing quantity | Picking, assigned order and actual result | Record no pick; open an inventory investigation. |
| Cancellation of missing quantity | Inventory clarification, order and confirmed correction status | Release the allocation once; do not create fictitious incoming stock. |
| Provide consignment | Complete pick record and version | Taken → provided with shipping order. |
| Confirming the transfer | Authenticated transit document for the existing order | Provided → Completed. |
Quantity allocated
- Input
- Order planning, article, storage location, whole positive number of pieces
- Result and protection
- Atomically check stock minus open allocations and reserve the quantity.
Notification of missing quantity
- Input
- Picking, assigned order and actual result
- Result and protection
- Record no pick; open an inventory investigation.
Cancellation of missing quantity
- Input
- Inventory clarification, order and confirmed correction status
- Result and protection
- Release the allocation once; do not create fictitious incoming stock.
Provide consignment
- Input
- Complete pick record and version
- Result and protection
- Taken → provided with shipping order.
Confirming the transfer
- Input
- Authenticated transit document for the existing order
- Result and protection
- Provided → Completed.
Messages across the external boundary
- Source contract
- EPCIS describes events in terms of subject matter, place, time and business context. Local allocation and route heuristics are own design decisions.
- System responsibility
- A picker confirms a pick. Stock, allocation and pick record commit together. After response loss, a retry returns the same record. A shorter route calculated later must not trigger another pick.
A pick binds the storage location and actual quantity
A pick binds the storage location and actual quantity.
Confirm pick can re-arrive after a lost response.
Order, storage location, allocated quantity, actual number of pieces and scan record must remain the same on replay. The exercise specifies the input and expected result.
- Alternative considered
- A key stored only in volatile memory loses its evidence on restart.
- Trade-off
- The Confirm pick command journal requires durable retention and protected access.
- Reassess
- The documented retry window and journal volume determine the future archiving strategy.
Try it yourself
For identical repetition, predict the results of “confirm pick”, the same key with a different number of pieces and a new key with an old version.
A hint for your attempt
Retry identity and current state require separate checks.
Compare with a possible solution
- Identical
- The saved result for picking order E-36 is returned; the effect is not repeated.
- Changed
- The same key with altered canonical content results in conflict.
- New intent with a stale version
- A new key with a stale version is rejected before any business change. The interface reloads the current state and asks the user to confirm the decision again.
Apply to your project
Which input fields make two change intentions different in your project?