Author | Andrei Makaranka | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JIRA task |
| ||||||||||||
Business Requirements |
| ||||||||||||
Architects Review |
| ||||||||||||
PO review |
|
...
Version | Date | Owner | Description | Reason |
---|---|---|---|---|
v1.0 | 04.27.2022 | Initial version | ||
v2.0 | 04.28.2022 | Andrei @@Andrei Makaranka | Model and API definitions added | |
v3.0 | 05.01.2022 | Andrei Makaranka | business PATCH method design added | |
v3.1 | 05.04.2022 | Diagrams added | ||
v3.2 | 05.09.2022 | Andrei Makaranka | storage 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.
...
Solution Design
Data Model
mod-orders
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 | YN | MOVENA | How to process connected holdings | [MOVE, FIND_OR_CREATE, CREATE] |
deleteAbandonedHoldings | boolean | Y | false | If abandoned holdings will be deleted |
mod-orders-storage
Define schema for DTO "storage_patch_order_line_request"
Name | Type | Mandatory | Default | Description | Note |
---|---|---|---|---|---|
operation | enum | Y | NA | Type of a partial modification | [REPLACE_INSTANCE_REF] |
replaceInstanceRef | storage_replace_order_line_instance_ref | N | NA | Replace instance reference |
Define schema for DTO "storage_replace_order_line_instance_ref"
Name | Type | Mandatory | Default | Description | Note |
---|---|---|---|---|---|
newInstanceId | UUID | Y | NA | Reference to new instance | |
holdings | array of storage_replace_order_line_holding_refs | N | NA | Holding references for replacement in the locations and pieces |
Define schema for DTO "storage_replace_order_line_holding_refs"
Name | Type | Mandatory | Default | Description | Note |
---|---|---|---|---|---|
fromHoldingId | UUID | Y | NA | Reference to previous holding | |
toHoldingId | UUID | Y | NA | Reference to new holding |
APIs
mod-orders-storage : Add PATCH method into ramls/po-line.raml
Method | Path | Request | Response | Description | Interface | Notes |
---|---|---|---|---|---|---|
PATCH | /orders-storage/po-lines/{id} | storage_patch_order_line_request | NA : Status 204 | Apply partial modifications to a order line | orders-storage.po-lines.item.patch | https://www.rfc-editor.org/rfc/rfc5789 |
mod-orders : Add PATCH method into ramls/order-lines.
...
raml
Method | Path | Request | Response | Description | Interface | Notes |
---|---|---|---|---|---|---|
PATCH | orders/order-lines/{id} | patch_order_line_request | NA : Status 204 | Apply partial modifications to a order line | orders.order-lines.item.patch |
https://www.rfc-editor.org/rfc/rfc5789 |
Detailed design
...
Class diagram
Should be defined in the mod-orders MODORDERS-683 (DTO : patch_order_line_request) and mod-orders-storage MODORDSTOR-298(DTO : storage_patch_order_line_request)
Sequence diagrams
Work Breakdown Structure
Work | Comments | Story | ~ Estimate | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 |
| 2 | ||||||||||
2 | Implement PATCH Storage API for updating Instance Reference for Non-package order line |
| 3 | |||||||||
3 | Define new business API for updating Instance Reference for Non-package order line |
| 2 | |||||||||
34 | Implement edit instance connection logic of POL - create inventory set to Instance, holding or Instance, holding, item |
| 3 | |||||||||
45 | Implement edit instance connection logic of POL - create inventory set to Instance or none |
| 3 | |||||||||
56 | Define data model for supporting edit instance connection logic of POL |
| 1 |
Open Items
Question | Answer |
---|---|
Andrei Makaranka Which link should be updated if there are more than one in the line? | Dennis Bridges Each link should be updated separately. If the POL has more than one location/holdings, after the instance connection is changed the POL should still have more than one location and depending on the settings used a new holdings ID should be added for each “location”. If the POL only has Holdings IDs you could use those existing holdings IDs to get a location ID from the “Permanent location” of each holdings. |
Andrei Makaranka For which pieces is it allowed to change the instance?(Expected, Received) | Dennis Bridges |