Promise representation in sequence diagram

0 votes
asked Feb 8 in Question / help by Pavel Sosin
is it correct representation?

@startuml
Entity Observer
Entity Observable
Entity Promise
activate Observer
create Observable
Observer -> Observable : run
activate Observable
create Promise
Observable -> Promise :deffer
Observable --> Observer : return promise

Observable -> Promise : resolve
deactivate Observable
Promise -> Observer : then
activate Observer
Observer -> Observer : processAsync
activate Observer
deactivate Observer

destroy Observable
@enduml

Looks too bulky

1 Answer

0 votes
answered Feb 28 by setop (280 points)

Not sure about correctness, but here is somethong less bulky:

...