Handling of BrewChamberEmpty messages

This is a special scenario for handling the BrewChamberEmpty messages. On the coffee machine, a BrewChamberEmpty error will pop up on the screen, indicating to the user that something may have gone wrong with the last product and that it could potentially have been caused by an empty bean hopper.

The D2D RAPI reports all products as unavailable while the BrewChamberEmpty message is active in the status list on the UI. This should help a remote client to not accidentally order a coffee product while the bean hopper is potentially empty. Just as on the UI however the D2D RAPI will still accept and confirm any request to produce a coffee product while BrewChamberEmpty is active.

@startuml

actor User
participant "Remote Controller" as remote
participant "Coffee Machine" as cm

remote -> cm: Request StartProduct
cm -> remote: Response StartProduct ok

cm -> remote: Event BrewChamberEmpty(errno=35)
note right
While pouring the product, the coffee machine
detected that the brew chamber is empty and
thus aborts pouring of the product.
end note
cm -> remote: Event ProductFinished(success=false)
cm -> remote: ProductAvailability (no product available)

group  BrewChamberEmpty still active
remote -> cm: Request StartProduct
cm -> remote: Response StartProduct ok
cm -> remote: Event BrewChamberEmpty
end
note right
Products can still be dispensed. On the
coffee machine, the BrewChamberEmpty
does not block the coffee products, it
just changes the ProductAvailability-List.
end note

User -> cm: confirm the BrewChamberEmpty error on UI
note right
A user, for example a service technician,
checks the machine and refills the bean
hopper if necessary. Then they confirm the
message in the status list on the UI.
end note

cm -> remote: ProductAvailability (previous list)
note right
Products will be listed as available again,
however when milk is still missing or too
warm, only non-milk products become available.
end note

note over remote, cm #FFAAAA
The coffee machine does not send any messages to confirm
the BrewChamberEmpty via the Remote API when the
BrewChamberEmpty error is confirmed in the UI.
end note

@enduml