Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: jvalentine on May 31, 2012, 11:38:03 am

Title: Need help decomposing a lifeline
Post by: jvalentine on May 31, 2012, 11:38:03 am
The UML tutorial for EA has a drawing of a sequence diagram with one of the lifelines decomposed into parts.  Does anyone here know how to do that?
Title: Re: Need help decomposing a lifeline
Post by: Geert Bellekens on May 31, 2012, 03:23:58 pm
Sorry, I don't know what you mean by a decomposing lifeline.
A picture would help.

Geert
Title: Re: Need help decomposing a lifeline
Post by: shimon on February 07, 2024, 06:20:46 pm
Hi,
Sorry for bumping this now, but I was looking for a solution to this yesterday, so I'll answer the question.

By "Decomposing" a lifeline, I assume he meant to break the activation into separate parts. You do this by right-clicking on a message and choosing Activations -> Start New Message Group.

There is the ability of hiding all activations on the Sequence Diagram.

This is done by Right-clicking on the diagram background and choosing Suppress Activations. I was surprised that this cannot be done by changing the Properties of the diagram ( unless I'm missing something).

In my opinion this has a much neater look, but you loose much of the ability to show which messages occur as a result of the proceeding messages. If the sequence is a single set of messages that always occur in this specified order, I would choose this "look".

Sincerely,
Shimon


Title: Re: Need help decomposing a lifeline
Post by: PDC on February 07, 2024, 08:04:44 pm
In my opinion this has a much neater look, but you loose much of the ability to show which messages occur as a result of the proceeding messages. If the sequence is a single set of messages that always occur in this specified order, I would choose this "look".

Maybe, but I'd suggest that if you aren't interested in control and activations within/between lifelines, or creation/destruction of objects, then a Sequence Diagram may not be the best choice. An Activity Diagram (possibly with typed swimlanes) might be more appropriate if all you're trying to show is that 'one thing happens after another'.

Re the original question, I think it might have been more to do with having structured Elements where the parent Element has a lifeline and its own 'Part' Elements are also rendered on the diagram with their own lifelines. EA lets you do that with Ports or Parts (e.g. see [https://sparxsystems.com/resources/tutorials/uml2/sequence-diagram.html], which was probably the diagram that the original question related to).
Title: Re: Need help decomposing a lifeline
Post by: shimon on February 08, 2024, 05:23:44 pm
Hi PDC,
I accept your point, if the purpose of the diagram is to show a flow of activities. I use sequence diagrams to verify that the intended design in the Analysis phase is valid at the Design and implementation phase.
I check to see that each message is properly documented and is implemented. For that purpose I think that it is more difficult to check via Typed swim-lanes. I have never tried it, so if you know otherwise please enlighten me.
Sincerely,
Shimon

P.S. I think that sequence diagram give the impression of having a "stricter" and truer representation in design than Activity Diagrams. Again, this is not from experience, just my musings. 
Title: Re: Need help decomposing a lifeline
Post by: Geert Bellekens on February 08, 2024, 06:22:39 pm
You can go pretty formal with Activity Diagrams.

Just make sure you use ActivityPartitions, and not Swimlanes. These are two different things in EA. One is a real UML element, the other a visual EA thing.

Geert
Title: Re: Need help decomposing a lifeline
Post by: PDC on February 08, 2024, 07:54:35 pm
P.S. I think that sequence diagram give the impression of having a "stricter" and truer representation in design than Activity Diagrams. Again, this is not from experience, just my musings.

I think we're basically showing that typical thing where different people have different preferences for representing the same or similar information, and UML & SysMLv1.x are actually flexible enough that one is 'allowed' to have those preferences and still conform to grammars, syntaxes, semantics etc. Sometimes, there is more than one definition of what is 'correct'. Luckily I work with businesses that don't rigidly audit themselves against the OMG specs or any particular in-house style guides (yet), so there is plenty of flexibility and everyone is happy.
I definitely agree with your particular points about identifying and documenting messages in the design that can then be proved by tracing forward to implementation - certainly nothing at all wrong with using SDs to achieve that. And EA lets you attach them to Classifiers as Operations which can be pretty well-defined.

Just make sure you use ActivityPartitions, and not Swimlanes. These are two different things in EA. One is a real UML element, the other a visual EA thing.

Absolutely correct, slip of my tongue :P