Issue 15123: Sequence diagram and Communication diagrams should support instances as lifelines (uml2-rtf) Source: Change Vision (Mr. Michael Jesse Chonoles, mjchonoles(at)yahoo.com) Nature: Uncategorized Issue Severity: Summary: Sequence diagram and Communication diagrams should support instances as lifelines Resolution: Revised Text: Actions taken: March 9, 2010: received issue Discussion: End of Annotations:===== te: Tue, 09 Mar 2010 15:24:21 -0500 From: "Chonoles, Michael J" Subject: RE: Communication Diagrams problems To: Bran Selic Cc: Østein Haugen , "Friedenthal, Sanford" , Roy M Bell , James Bruck , "model-interchange@omg.org" , "uml2-rtf@omg.org" , "issues@omg.org" Thread-Topic: Communication Diagrams problems Thread-Index: Acq/xjJfr0NH1JJOTzGf/azHHM0m5QAABZMA Accept-Language: en-US acceptlanguage: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: And that.s what broke going to UML 2.x Juergen, could you add an issue fort UML Sequence diagram and Communication diagrams should support instances as lifelines. Thanks From: bran.selic@gmail.com [mailto:bran.selic@gmail.com] On Behalf Of Bran Selic Sent: Tuesday, March 09, 2010 3:22 PM To: Chonoles, Michael J Cc: Østein Haugen; Friedenthal, Sanford; Roy M Bell; James Bruck; model-interchange@omg.org; uml2-rtf@omg.org Subject: Re: Communication Diagrams problems You can still show a single object playing multiple roles, using a collaboration use. However, it will not be visible in a sequence or a communications diagram. Related to this, and it may be what is behind your beef, Michael, is it is not possible to show instances in a sequence diagram. They only work for collaborations and their elements. This should probably be fixed because most people expect to be able to show instances collaborating. Bran On Tue, Mar 9, 2010 at 3:08 PM, Chonoles, Michael J wrote: In UML 1.x, you could have a box element representing an instance, while the links entering the box could have role names at the end. This would allow box element to play two different roles. It would also allow for a very quick automatic understanding of what the code would do. I don.t believe that is still possible, or at least the spec is so sparse in communication diagrams you can.t quite tell. Michael From: bran.selic@gmail.com [mailto:bran.selic@gmail.com] On Behalf Of Bran Selic Sent: Tuesday, March 09, 2010 2:56 PM To: Chonoles, Michael J Cc: Østein Haugen; Friedenthal, Sanford; Roy M Bell; James Bruck; model-interchange@omg.org; uml2-rtf@omg.org Subject: Re: Message sequences I don't understand, Michael. Nothing has changed in that regard in UML 2. The box element in a collaboration diagram was always a role in a collaboration, which is what a lifeline is. As for sequence numbers, I suggest that, if we cannot come up with a consistent way of specifying them, they are not particularly useful and can, in fact, be misleading (i.e., if each tool does it differently). Either we fix this or get rid of them altogether. Since various tools already have algorithms for assigning these numbers, then we know that it is possible. My suggestion is that we choose one of those algorithms and publish it in the spec. Cheers...Bran On Tue, Mar 9, 2010 at 2:16 PM, Chonoles, Michael J wrote: I was a big fan of 1.x collaboration diagrams and found them very useful, especially when showing a pattern of behavior. However, with the change to UML 2.x, it appears that the changes made them less useful, and I find that I just skip them. Perhaps I misunderstood the changes, but it appears that by making a box element be a lifeline with the name inside and eliminating role names, I could not illustrate situations where a particular object played more than role in a particular situation. I can imagine sequence number in sequence diagram still being useful, but would not agree on any agreed upon numbering of the messages. Perhaps if the sequence diagram fragment was STRICT, with no overtakes. Or we defined the numbering to be only for messages ends that touch a particular lifeline.. Michael From: bran.selic@gmail.com [mailto:bran.selic@gmail.com] On Behalf Of Bran Selic Sent: Tuesday, March 09, 2010 11:35 AM To: Østein Haugen Cc: Friedenthal, Sanford; Roy M Bell; James Bruck; Chonoles, Michael J; model-interchange@omg.org; uml2-rtf@omg.org Subject: Re: Message sequences I cannot help but remark that the only place where I have seen communication diagrams used is in textbooks. In practice, this notation simply does not scale up nor is it particularly readable, sequence numbers or no -- message names are usually too long for the space available, so that the diagrams become unusable very quickly. So, if the only justification for message numbers is communication diagrams, I would suggest we don't bother. However, I disagree that this is the only place people find sequence numbers useful. I find them useful in sequence diagrams as well. Bran On Tue, Mar 9, 2010 at 10:54 AM, Østein Haugen wrote: Roy You are absolutely right. It is also the case that such fragments cannot be represented in communication diagrams. We actually did make an effort to make a notation to make it possible during the work on UML 2.0, but agreed that the suggested notation was not intuitive / illustrative. Therefore the communication diagrams are just like in UML 1 and that is where the sequence numbers are. Having sequence numbers on messages in sequence diagrams is not according to the language definition. (As for the examples in the O'Reilly book by Pilone, they are all right apart from the fact that they use underlines under the names of lifelines. Lifelines should not be underlined as they are not instance specifications.) /Oystein ---- Dr. Oystein Haugen Senior Researcher SINTEF -------------------------------------------------------------------------------- From: Friedenthal, Sanford [mailto:sanford.friedenthal@lmco.com] Sent: 9. mars 2010 16:23 To: Roy M Bell; Østein Haugen Cc: James Bruck; Chonoles, Michael J; model-interchange@omg.org; Østein Haugen; Bran Selic; uml2-rtf@omg.org Subject: RE: Message sequences Roy We can identify and prioritize our next test cases as part of our face to face meeting on Monday, March 22 in Jacksonville. Currently, we are going to complete this phase of UML testing with Test Case #9. Sandy From: Roy M Bell [mailto:Roy_M_Bell@raytheon.com] Sent: Tuesday, March 09, 2010 9:50 AM To: Østein Haugen Cc: James Bruck; Chonoles, Michael J; model-interchange@omg.org; Østein Haugen; Bran Selic; uml2-rtf@omg.org Subject: RE: Message sequences Østein Haugen wrote on 03/09/2010 03:02:15 AM: > James > Just a historical remark. The sequence numbers are taken "as is" > from UML 1 and are in UML2 therefore considered just concrete > syntax. The problem was/is that sequence diagrams do not define > sequences of messages, but sequences of occurrences (corresponding > e.g. to the ends of the messages) as Michael points out. Therefore > the communication diagrams cannot express all those situations that > a sequence diagram can. It was never intended that the messages of a > sequence diagram should have any numbering. Those are only meant for > the communication diagrams. I have used MagicDraw to reproduce a couple of diagrams from a book called "UML 2.0 in a Nutshell" published by O'Reilly. These diagrams are using sequence "fragments" such as critical sections, parallel, alternatives, etc. I think it would be very hard to determine how to number these sequences. Are we still planning to have a test case 10 for these types of sequence "fragments"? > > We explicitly decided not to include sequence diagrams in the > metamodel because this would be confusing. We normally do not > include attributes in the metamodel that are only there for tool > calculations, but I can see the motivation. > > Regards, > Oystein > > PS: Once responsible for how it has become under the pressure of > those who wanted backward compatibility with UML1 -- Thanks, -- Roy