Production
Every day the dairyman receives a production plan from Raffaella, containing instructions on the cheese he needs to produce for the day.
To determine the ingredients to use for a production the dairyman uses a recipe book where, for each type of cheese, there is a recipe. A recipe specifies the quintals of each ingredient needed to produce a quintal of the given type of cheese.
e.g. The recipe for a quintal of ricotta requires 1.5 quintals of milk, a tenth of quintal of rennet and a tenth of quintal of salt
Once the appropriate recipe is chosen the production can start by retrieving the needed ingredients.
Once an in-progress production ends (the smart machines will send an appropriate message to signal the end of the process), the produced cheese is assigned a batch ID and stored in a refrigeration room.
Ubiquitous Language
Term | Definition |
---|---|
Production plan | A production plan that specifies how many units of products need to be produced. |
Production plan item | A single line of a production plan that specifies a product and how many units of it to produce. |
Production To Start | A production that needs to be started, it specifies the product to produce and the units in which it needs to be produced. |
Production In Progress | A production that has already started, it specifies the product that is being produced and the units in which it is being produced. |
Ended Production | A production that ended, it has a batch ID and specifies the product that was produced and in the units produced. |
Recipe book | Associates to each cheese type the recipe to produce a quintal of it. |
Recipe | A list of ingredients and the respective quintals needed to produce a quintal of a product. |
Quintals of ingredient | An ingredient and a weight in quintals. |
Cheese type ripening days | For each cheese type, associates its ripening days. |
Ripening days | The number of days a cheese type has to ripen before being ready. |
Domain Events
Incoming Events
Event | Description |
---|---|
Production plan ready | Specifies the production plan for the day with the products that need to be produced. |
Production ended | Fired when a production is terminated by a smart machine. |
Outgoing Events
Event | Description |
---|---|
Start production | Fired when a production needs to be started, specifies the needed ingredients and the quantity necessary to sustain the production. |
New batch | Fired when a production is terminated, given a batch ID and sent to the refrigeration room. |