...
This case looks the same to 1). Changing of each moved item by request: PUT /inventory/items/{itemId} with new item.holdingsRecordId.
Bulk operation approach
High-level description
The UI-client sends an array of items/holdings in a single update request to endpoints PUT /inventory/items or inventory/holdings. The mod-inventory processes this request and prepares a request for each item/holding in the array and sends it asynchronously to the mod-inventory-storage. The mod-inventory waits for all responses from mod-inventory-storage to be completed and populates a response. In case of errors in some of the updating requests in the mod-inventory-storage, the mod-inventory returns a response containing a list of not updated elements.
Flow details
Drawio border true diagramName Items_holdings_bulk_operations simpleViewer false width links auto tbstyle top lbox true diagramWidth 511 revision 1
1) Send array of items to be updated in one request with updated item.holdingsRecordId.
2) Send asynchronously update request for each item.
3) Wait all responses, populate errors if some of request failed.
4) Return response to UI client.
5) Send array of holdings to be updated in one request with updated holding.instanceId.
6) Send asynchronously update request for each item.
7) Wait all responses, populate errors if some of request failed.
8) Return response to UI client.