Note: This project depends on a personal GitHub Package Registry. In order to build locally, it is necessary to set USERNAME and TOKEN environment variables. Instructions for the generation of a token are available in Creating a personal access token.
Run tests: ./gradlew test
sequenceDiagram
participant Client
box rgba(88, 214, 141, 0.3)
participant Ordering
end
participant Menu
participant Stock
participant Invoices
participant Preparation as Drink<br/>Preparation
Client ->> +Ordering : Order
Ordering ->> +Menu : Get recipe
Menu -->> -Ordering : Recipe
loop for each ingredient in recipe
Ordering ->> +Stock : Get available quantity
Stock -->> -Ordering : Available quantity
end
alt required quantities are available
Ordering -->> +Preparation: Queue order
Ordering ->> Invoices: Save invoice
Ordering -->> -Client : Invoice
end
- Do not check availability of ingredients
- Consider all ingredients as available in case Stock service is down
- Check customer account for possible discounts
- Make preparation step blocking