Rinse

Handling of the Postpone Rinse Command

The “PostponeRinse” command postpones a requested rinse from the coffee machine. For example, if a customer is placing an order at an external interface, the coffee machine should not rinse, otherwise the rinse will end up in the customer’s cup. To avoid this, the rinse can be postponed with the “PostponeRinse” command. The rinse can be triggered again with the “ForceRinse” command after the user interaction is completed, so that the machine is ready to take the next order.

@startuml
actor User
RemoteController <- User: Start Ordering
CoffeeMachine -> RemoteController: RinseUpcoming(60000)
note left: User interacts with the remote controller,\nso no rinse should be done. 
RemoteController -> CoffeeMachine: PostponeRinse(600000)
note right: Rinse is going to be postponed so that the user can \nfinish ordering the product.
CoffeeMachine -> RemoteController: Respone RinsePostponed ok
RemoteController <- User: Finished Ordering
RemoteController <- CoffeeMachine: Finished product
RemoteController -> CoffeeMachine: ForceRinse
note right: After the user has completed the order and the product is ready,\nthe rinse is forced by the RemoteControler.\nThis resets the running rinse timer. 
note over RemoteController, CoffeeMachine #FFAAAA: The RemoteController can postpone the rinse maximum 3 times,\nafter that the coffee machine will perform the rinse.
@enduml

Requirements:

  • The rinse postponement can be set on the machine to max. 600 sec.

  • Maximum possible rinse delay is: Initial 600s (max.) + 3 x Postpone à 600s (max.) = 2400s (40min).

  • A rinse can be postponed up to three times via “PostponeRinse” command.

  • The rinse is carried out automatically, after the postponed time has expired.

  • A rinse can be executed directly with a “ForceRinse” command by the client.

  • If the rinse was successful, the client may postpone the next rinse up to 3 times again.