/
Design of Orderables and FTAP versioning
Design of Orderables and FTAP versioning
- How to update Orderable?
- use PUT /api/orderables/ID, you can update only latest version, attempt to update past version will be rejected. This be verified based on the versionId included in the request body
- every change will spawn a new version
- we use a serial integer starting at 1. The version of that uniquely identified thing is something that is bounded by ACID, and therefore should always increase in a predictable fashion. Note what this means is that when you change an entity (say in the UI), you never increment the version and send it back, that's a function of the write operation on the server from which it was read.
OpenLMIS allow any attribute change which is defined in the GDSN and trust that the author understands the effect of that master data in the supply chain.
- How to update FTAP?
- FTAP should reference non-versioned Orderable, Program, and Facility Type.
- use PUT /api/facilityTypeApprovedProducts/ID
- every change will spawn a new version
- we use a serial integer starting at 1. The version of that uniquely identified thing is something that is bounded by ACID, and therefore should always increase in a predictable fashion. Note what this means is that when you change an entity (say in the UI), you never increment the version and send it back, that's a function of the write operation on the server from which it was read.
How to retrieve the historical versions?
- Orderable has version property and we can get version by calling e.g. GET /api/orderables/ID?versionId=5. Migration set the version to 1 by default.
- FTAP has version property and we can get version by calling e.g. GET /api/facilityTypeApprovedProducts/ID?versionId=5. Migration set the version to 1 by default.
Related content
Design within Orders
Design within Orders
More like this
Orderable Refactor Meeting Notes 2017-05-08
Orderable Refactor Meeting Notes 2017-05-08
More like this
Beta to 3.0 changes
Beta to 3.0 changes
More like this
2017-10-03 Meeting notes
2017-10-03 Meeting notes
More like this
Lot Management for Stock Management Service
Lot Management for Stock Management Service
More like this
Requisition - Convert requisition to order
Requisition - Convert requisition to order
More like this
OpenLMIS: the global initiative for powerful LMIS software