The PromiseDao only supports one source for promises: the Delivery Promise Service (DPS). We already need to get promises from another service, the Order Fulfillment Service (OFS), so this is a good time to make the design more flexible.
It accepts two clients, the DeliveryPromiseServiceClient and the OrderManipulationClient. Using the omaClient, getDeliveryDateForOrderItem accepts a customerOrderItemId parameter to get the orderId, from there it finds the delivery date for the item(s). Using the dpsClient, it gets the delivery date and adds any promises found to a list of Promises and sets the delivery date.
Consider a developer unfamiliar with the Missed Promise CLI. Can you add diagrams here that will help them understand how the PromiseDao works right now?
Describe in a few sentences how your changes will satisfy the use cases you listed above. How will you enable getting promises from OFS? How will you allow new promise sources to be added easily in the future?
Consider a reviewer who misunderstands this design and believes you're going to make the PromiseDao perfect. What are you not going to do?
NOTE: You can leave out classes that don't participate in the new solution, but you should leave in anything that uses your updates. For instance, even if you don't change the GetPromiseHistoryByOrderIdActivity, it's going to use the PromiseDao that you changed, so you should leave it in. Also make sure to include a link to the PlantUML source. Pro Tip: you can change a class's color by adding “#colorname” after its name! (For example, #lightgrey visually indicates that although a class is involved, it's not a major discussion point right now).