Milk Planning
Every Saturday Raffaella has to estimate the quintals of milk necessary to produce all products for the following week. She makes this estimate by taking into account the following factors:
- the quintals of milk processed in the same period of the previous year
- the quintals of milk needed by the products that have to be produced in the following week (this is made by reading from a recipe book the yield of milk to produce a quintal of a given product)
- the current stock
- the quintals of milk already in stock
💡 After the estimate is complete the restocking B.C. is notified of the result so that it can make a milk order
Ubiquitous Language
Term | Definition |
---|---|
Processed milk | The quintals of milk processed in order to produce cheese. |
Quintals of milk | A quantity of milk expressed in quintals. |
Yield | A decimal that represents the yield of milk when producing a given cheese type: i.e. to produce n quintals of a given cheese type, yield of cheese type * n quintals of milk must be used. |
Recipe book | It defines, for each cheese type, the yield of milk when producing it. |
Stock | It defines, for each product, the quantity available in stock. |
Stocked quantity | A quantity of a stocked product, it may also be zero. |
Quantity | A quantity of something. |
Requested product | A product requested in a given quantity that has to be produced by the given date. |
Domain Events
Incoming Events
Event | Description |
---|---|
Received order | Event representing an order placed used to estimate the quintals of milk to be ordered. |
Outgoing Events
Event | Description |
---|---|
Order milk | Event to order the quintals of milk needed for the next week. This event is emitted every week on saturday. |