---
# System prepended metadata

title: 'SlotMachine Sequence Diagram: AUs/Controller'

---

# SlotMachine Sequence Diagram: AUs/Controller

```plantuml

@startuml
skinparam componentStyle uml2
skinparam monochrome true
skinparam dpi 300
skinparam arrowThickness 2
skinparam packageTitleAlignment left
skinparam defaultFontSize 12
skinparam rectangleBorderThickness 1

participant AUs
participant "AUs REST" as AUsREST
participant Controller


Controller -> AUsREST: POST /AURESTService/callbackEndpoint, Body: SolutionNotificationDTO
note left of Controller
{
  ...,
  "solutionStatus": "PROPOSED"
}
end note

AUsREST -> AUs: WebSocket NewProposedSolutionsNotification
note left of AUsREST
{
  "mutation": "NEW_PROPOSED_SOLUTIONS_AVAILABLE",
  ...
}
end note

AUsREST --> Controller: 200 OK

AUs -> AUsREST: GET /AURESTService/actualProvidedSolutions
AUsREST -> Controller: GET /optimizations/{$optId}/solutions

Controller -> AUsREST: 200 OK, Content: SolutionListDTO
AUsREST -> AUs: 200 OK, Content: SolutionListDTO

AUs -> AUsREST: POST /AURESTService/rejectSolutions
AUsREST -> Controller: POST /optimizations/{$optId}/solutions/rejections
Controller --> AUsREST: 200 OK
AUsREST --> AUs: 200 OK

Controller -> AUsREST: POST /AURESTService/callbackEndpoint, Body: SolutionNotificationDTO
note left of Controller
{
  ...,
  "solutionStatus": "ACCEPTED"
}
end note
AUsREST -> AUs: WebSocket NewAcceptedSolutionsNotification
note left of AUsREST
{
  "mutation": "NEW_ACCEPTED_SOLUTIONS_AVAILABLE",
  ...
}
end note

AUsREST --> Controller: 200 OK

AUs -> AUsREST: GET /AURESTService/actualAcceptedSolution
AUsREST -> Controller: GET /optimizations/{$optId}/solutions/accepted
Controller --> AUsREST: 200 OK
AUsREST --> AUs: 200 OK

@enduml