• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about UML Sequence Diagram

 
Lin Feng
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple question about how to show reuse part in sequence diagram
Suppose I have the following flow

A send mesage to B
If condition then
B send message to C
ELSE
B send message to D
C and D all send the same message to E .
E sends message to F ... etc.

The part from E could be large. If I just draw the diagram directly, I have to draw the sequence message flow starts from E two times , one for each branch in the same diagram .
I wonder if there is a way to just draw the part starting from E one time. Actually the redrawed parts are totally identical.
Or I should draw 2 sequence diagram, one just show sequence flow before E, another shows the sequence diagram from E.
Thanks for your help.
 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by LIN FENG:
...If I just draw the diagram directly, I have to draw the sequence message flow starts from E two times ...
Or I should draw 2 sequence diagram, one just show sequence flow before E, another shows the sequence diagram from E. ...

Both of your solutions would be valid UML practices. I cannot say what Sun would be looking for in the SCEA project (because I don't know). So, it is up to you to choose a solution that would know is best as a software architecture.
 
Lin Feng
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
Thank you very much. Would you please tell me if there is a way to draw it in one sequence diagram but can avoid the duplication part?
Thanks
Lin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic