What's the best way to represent a message that doesn't get received in a sequence diagram?

+2 votes
asked Jul 17, 2014 in To be sorted by anonymous
I am trying to define a sequence that occurs when a message is missed in my system. What's the best way to do that with PlantUML?

The website http://www.uml-diagrams.org/sequence-diagrams.html#lost-message indicates a closed circle means a message was lost, but I don't see a way to do that in PlantUML.  Is the purpose of ->o to indicate a lost message?

4 Answers

0 votes
answered Aug 14, 2014 by Fuhrmanator (1,700 points)

Perhaps not the best way, but you could try:

skinparam style strictuml
boundary " " <<Lost>>
Bob->Alice : hello
Bob ->o " "
Lost message
0 votes
answered Aug 21, 2014 by rmric (2,140 points)

Good idea Fuhrmanator! If you want to get away with the "Lost" participant, you may try incoming/outgoing message syntax:

           Bob ->o]
           [<-o Bob

The last one has a bug when going leftside, since it should logically be  [o<- Bob

Rem: Should we ask for a new arrow ending letting us represent a UML's lost message ?
This new ending would generate a filled circle. What syntax? Maybe   ->*  ?

And instead of having the arrow going outside the diagram with the in/out message syntax, maybe we could introduce a new syntax for lost message, for example  Bob ->*)   or  Bob ->*[  ??


commented Aug 21, 2014 by anonymous
The asterisk '*' is used to denote multiplicity in many UML diagrams so I would suggest some other character, maybe an 'o'?
0 votes
answered Aug 21, 2014 by anonymous

Thanks for the suggestions.

I tried both of those, but what I wound up using was:

    src ->o dest: Message

I decided the open circle looked like the message didn't quite hit its target, but I could still see what the intended destination was. Using the "Lost" boundary or sending a message to the side of the page made it more visually obvious that the message was not received, but completely lost indication of the destination, which was important for my diagram.




+1 vote
answered Aug 22, 2014 by Fuhrmanator (1,700 points)

Ok, here's another try (remembering how objects die...):

src ->x dest: Message


commented Aug 22, 2014 by rmric (2,140 points)
I like it!
It's not UML strict, but it's more understandable.

Note: the webpage about incoming/outgoing message syntax (sequence.html#inout) would need an update to document such arrow ending.
commented Aug 22, 2014 by plantuml (295,000 points)
Sure, we will update the sequence.html page!
commented Aug 28, 2014 by rmric (2,140 points)
Thank you for the update on the html page.

BTW, to be on par with the other arrow endings wrt to incoming and outgoing message, could it be possible to have the following syntax (with optional message text) ?


  src -x]
  [x- src
commented Aug 29, 2014 by plantuml (295,000 points)
Good idea!

In the following beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can have:

Alice ->]
[-> Alice
Alice ->o]
[->o Alice
Alice ->x]
[->x Alice
Alice x<-]
[x<- Alice

Is this what you were expecting ?
commented Sep 5, 2014 by rmric (2,140 points)
Exactly, many thanks!