I'm new to sequence diagrams, and I am struggling to find out how to markup asynchronous flows.
Here is a synchronous HTTP flow:
@startuml
"Purchase" -> "Auth" : Check user
"Auth" --> "Purchase" : 2s
"Purchase" -> "Payment" : Deduct balance
"Payment" --> "Purchase" : 2s
"Purchase" -> "Provision" : Supply
@enduml
Lets pretend the last "Provision" step is asynchronous. How would one best express that? Just the responses?
"Purchase" -> "Auth" : Check user
"Auth" --> "Purchase" : 2s sync
"Purchase" -> "Payment" : Deduct balance
"Payment" --> "Purchase" : 2s sync
"Purchase" -> "Provision" : Supply
"Provision" --> "Purchase" : 0s async
@enduml
https://plantuml.com/demo-javascript-asynchronous is a tool to preview the diagram.