Author | Andrei Makaranka |
---|---|
JIRA task | |
Business Requirements | |
Architects Review | IN PROGRESS |
PO review | IN PROGRESS |
Revision History
Version | Date | Owner | Description | Reason |
---|---|---|---|---|
v1.0 | 04.27.2022 | Andrei Makaranka | Initial version | |
v2.0 | 04.28.2022 | Andrei Makaranka | Model and API definitions added | |
v3.0 | 05.01.2022 | Andrei Makaranka | PATCH method design added |
Overview
Current situation or problem: When a purchase orders is connected to the wrong instance there is no way to correct it. Unopening orders to do this is causing issues with receiving workflow.
Use cases
- Purchase order was connected to the wrong instance (often the electronic rather than physical instance) because of instance matching logic that is invoked for orders created through GOBI integration.
- Purchase order was connected to the wrong instance because of human error.
- Purchase order was connected to the wrong instance during order import or migration.
High-Level Requirements:
Constraints
- Instance update can not be dine for Package purchase order line
Assumptions, dependencies
In scope
Allow user to change the instance connection of a POL
When changing connection FOLIO will update all related order and inventory records
Out of Scope
- Allow user to Change instance connection but only update some records (Ie. do not move certain items)
Architecturally Significant Requirements
- No need to support distribution and compensation transactions
Solution Design
Data Model
Define schema for DTO "patch_order_line_request"
Name | Type | Mandatory | Default | Description | Note |
---|---|---|---|---|---|
id | UUID | Y | NA | Unique identifier of the order line | |
operation | enum | Y | NA | Type of a partial modification | [REPLACE_INSTANCE_REF] |
replaceInstanceRef | replace_order_line_instance_ref | N | NA | Replace instance reference |
Define schema for DTO "replace_order_line_instance_ref"
Name | Type | Mandatory | Default | Description | Note |
---|---|---|---|---|---|
newInstanceId | UUID | Y | NA | Reference to new instance | |
holdingsOperation | enum | Y | MOVE | How to process connected holdings | [MOVE, FIND_OR_CREATE, CREATE] |
deleteAbandonedHoldings | boolean | Y | false | If abandoned holdings will be deleted |
APIs
Add PATCH method into ramls/order-lines.raml
Method | Path | Request | Response | Description | Interface | Notes |
---|---|---|---|---|---|---|
PATCH | /order-lines/{id} | patch_order_line_request | NA | Apply partial modifications to a order line | orders.order-lines.item.patch | Status : 204 |
Detailed design
- Define ReplaceOrderLineInstanceFlowManager class in the org.folio.service.orders.lines
Work Breakdown Structure
Work | Comments | Story | ~ Estimate | |
---|---|---|---|---|
1 | ||||
2 | Define new business API for updating Instance Reference for Non-package order line | 2 | ||
3 | Implement edit instance connection logic of POL - create inventory set to Instance, holding or Instance, holding, item | 3 | ||
4 | Implement edit instance connection logic of POL - create inventory set to Instance or none | 3 | ||
5 | Define data model for supporting edit instance connection logic of POL | 1 |
Open Items
Question | Answer |
---|---|