• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

UML sequence Diagram

 
Ranch Hand
Posts: 180
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a general question in Sequence diagrams.
Can i have two objects with same name in a single sequence
diagram.
The Problem is i need to depict the full flow of my app.
So it encounters the same class in the beginning of the flow
and also in the end part of the flow.
I know i break it and have a reference of the diagrams.
But is it allowed in UML to put the same class twice
in the single sequence diagram.

EA perfectly allows that in UML2.0 specification.
Please advise.

Thanks in advance
Saurav
 
Ranch Hand
Posts: 376
Scala Monad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can have many objects of the same class in a sequence diagram.
You shouldn't be able to to have different objects with the same name, I'm not sure if the UML specification allows it, but it will be very confusing!
Supose you have o1 of class C1 and o2 of class C2

Instead of
<br /> <br /> <br /> you'll have:<br />


In the first diagram o1 send a message to o2 and o2 sends a message back.
In the second diagram, to what object o2 is sending the message? if the first and last objects are the same, why it appears twice? if they're different, why they have the same name?
Maybe there's a special occation in which can be useful, but I can't think any example...
 
Heroic work plunger man. Please allow me to introduce you to this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic