I’m currently designing an architecture of using Orderable and FTAP versioning in Requisition Line Item (RLI). I have figured out the following changes which should be committed in RLI:
- Adding FTAP id and FTAP version to RLI - to reference an FTAP in RLI to handle multiple version
- Adding Orderable version to RLI - to reference an Orderable in RLI to handle multiple version. Orderable id has been already added.
- Removing maxPeriodsOfStack from RLI entity - this field is currently snapshotted (copied) from FTAP. After adding a reference to FTAP, the FTAP fields shouldn’t be stored in RLI but retrieved from FTAP on demand.
- Removing packsToShip, pricePerPack, totalCost and nonFullSuply from RLI entity - the fields are currently snapshotted (fetched from Orderable and calculated). The values should be retrieved via Orderable reference.
- Id and version should be encapsulated in one class eg. EntityReference. It should apply both to Orderable and FTAP reference.
There should be a migration committed for the existing RequisitionLineItems. The simplest approach is to drop the mentioned fields and obtain the values by referencing the latest available Orderable/FTAP version.
What do you think about the described solution? Do you have any suggestions or do you see any potential impediments?