'Created with https://www.planttext.com/

@startuml

skin rose

title Events and visit states

label start
card proposed
card assigned
card confirmed
card completed
card canceled

start -down-> proposed : "visitRequest"
proposed -down-> assigned : "claimVisit"
assigned -down-> confirmed : "confirmVisit"
confirmed -down-> completed : "visitTimePassed"

proposed --> canceled : "cancelVisit"
assigned -left-> canceled : "cancelVisit"
confirmed --> canceled : "cancelVisit"

rectangle "The abandonVisit event takes the state from\neither assigned or confirmed back to proposed"

@enduml