-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsustainable_packaging_SD.puml
72 lines (54 loc) · 1.9 KB
/
sustainable_packaging_SD.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@startuml
title Sustainable Shipment Service Sequence Diagram
actor FC
participant PrepareShipmentActivity
participant LambdaRequest
participant PrepareShipmentRequest
participant ShipmentService
participant PackagingDAO
participant FulfillmentCenter
participant Item
participant Packaging
participant ShipmentOption
participant ShipmentCost
participant CostStrategy
participant LambdaResponse
participant PrepareShipmentResponse
== Request Flow ==
FC -> PrepareShipmentActivity : handleRequest(LambdaRequest<PrepareShipmentRequest>)
Activate PrepareShipmentActivity
PrepareShipmentActivity -> LambdaRequest : fromQuery(MapToPojoConverter<T>)
Activate LambdaRequest
LambdaRequest -> PrepareShipmentRequest : builder().withFcCode(fcCode)...
Activate PrepareShipmentRequest
PrepareShipmentRequest -> ShipmentService : handleRequest(PrepareShipmentRequest)
Activate ShipmentService
== Shipment Processing ==
ShipmentService -> PackagingDAO : findShipmentOptions(Item, FulfillmentCenter)
Activate PackagingDAO
loop List of all FcPackagingOptions
PackagingDAO -> Packaging : canFitItem(Item)
Activate Packaging
PackagingDAO <-- Packaging : boolean
PackagingDAO -> PackagingDAO : add to result (if item fits)
end
PackagingDAO --> ShipmentService : List<ShipmentOption>
Destroy PackagingDAO
ShipmentService -> ShipmentService : getLowestCostShipmentOption(results)
ShipmentService -> CostStrategy : getCost(option)
Activate CostStrategy
CostStrategy --> ShipmentService : ShipmentCost
Destroy CostStrategy
ShipmentService -> LambdaResponse : success(PrepareShipmentResponse)
Activate LambdaResponse
LambdaResponse -> PrepareShipmentResponse : builder().withDetails(...)
Activate PrepareShipmentResponse
== Response Flow ==
LambdaResponse --> FC : Response
Destroy LambdaResponse
Destroy PrepareShipmentResponse
Destroy ShipmentService
Destroy PrepareShipmentRequest
Destroy LambdaRequest
Destroy PrepareShipmentActivity
@enduml