Add order sequence diagram

This commit is contained in:
Mathis Kral 2023-11-09 22:08:20 +01:00 committed by Simon Bruder
parent 04f6f04512
commit 4052224dba
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,79 @@
@startuml
participant Customer
participant OrderController
participant Cart
participant OrderManagement
participant Spring
participant "order1:CustomOrder" as order1
== Add products to an event ==
Customer --> OrderController : event(Model model)
activate Customer
activate OrderController
OrderController --> Cart : iterator()
activate Cart
OrderController <-- Cart : Iterator<CartItem>
deactivate Cart
OrderController --> Spring : model.addAttribute()
activate Spring
OrderController <-- Spring : Model
deactivate Spring
Customer <-- OrderController : "event.html"
deactivate OrderController
Customer --> OrderController : addProduct()
activate OrderController
OrderController --> Cart : addOrUpdateItem()
activate Cart
OrderController <-- Cart
deactivate Cart
OrderController --> Spring : model.addAttribute()
activate Spring
OrderController <-- Spring : Model
deactivate Spring
Customer <-- OrderController : "redirect:/event.html"
deactivate OrderController
deactivate Customer
== Checkout (finish event planning) ==
Customer --> OrderController : checkout()
activate Customer
activate OrderController
create order1
OrderController --> order1 : new Order()
activate order1
OrderController <-- order1 : Order
deactivate order1
OrderController --> Cart : addItemsTo(order1)
activate Cart
OrderController <-- Cart
deactivate Cart
OrderController --> OrderManagement : payOrder(order1)
activate OrderManagement
OrderController <-- OrderManagement
OrderController --> OrderManagement : completeOrder(order1)
OrderController <-- OrderManagement
deactivate OrderManagement
OrderController --> Cart : clear()
activate Cart
OrderController <-- Cart
deactivate Cart
Customer <-- OrderController : "redirect:/cart.html"
deactivate Customer
deactivate OrderController
== List orders ==
Customer --> OrderController : orders()
activate Customer
activate OrderController
OrderController --> OrderManagement : findAll()
activate OrderManagement
OrderController <-- OrderManagement : Page<CustomOrder>
deactivate OrderManagement
OrderController --> Spring : model.addAttribute()
activate Spring
OrderController <-- Spring : Model
deactivate Spring
Customer <-- OrderController : "orders.html"
@enduml

BIN
src/main/asciidoc/models/design/seq_order.svg (Stored with Git LFS) Normal file

Binary file not shown.