UML - Sequence diagram life lines [duplicate] - uml

This question already has answers here:
What do the vertical rectangles convey in a UML sequence diagram?
(2 answers)
Closed 9 years ago.
On a sequence diagram, what does the vertical thin rectangles on the object life line signify ? I could not find a proper answer after searching a lot . Would some one please help me understand this?
Thanks in advance.

It is for displaying one interaction of the object with other object or itself. Interaction needs to be started within that rectangle in the top side and end near bottom side. There is no need to start or end interaction in the top most or bottom most edges in the rectangle. Some also call these as Execution Specifications as well. Have a look at some examples here

Sequence diagram life lines represent different processes or objects that live simultaneously.Lifelines represent only one interacting entity.It is basically a vertical dashed line that represents existence of an object over a period of time.This line disappears when the object is destroyed.As for example see the diagram below:
The data here is an object of type Stock.We can show all the interactions among objects like message exchanges on these lifelines.Just take a look at the diagram below describing interaction between a computer and a server :
Note that the thin vertical rectangles represent execution specification.
Execution specification is a part of object's interaction which represents period of object's lifetime when it is either doing some activity or simply waiting for the reply from other object.
Notation for execution specification is as follows:

Related

Use Case Diagram - show actors multiple times [duplicate]

This question already has answers here:
UML Diagrams: Can I use same actor on one diagram couple of times?
(2 answers)
Closed 4 years ago.
Is it allowed in Use Case Diagrams to place the same actor at different places in the Same Use Case Diagram because of overview issues?
I have a lot of Use Cases spread all over the diagram but drawing a line to every Use Case from a single actor that is placed on top of the diagram makes the whole Diagram very very confusing, because a lot of association lines strikethrough some of the Use Cases.
Yes it is allowed, there is no rule saying it is forbidden.
However that could indicate a problem concerning your actors/UCs, or of course your diagram is just too complex and you have to divide it in several.

UML new lifeline

I am doing a UML sequence diagram and I've got like, say, a GUI Controller object who wants to create a new Circle object and then add it to an ActiveDrawables object. Would the diagram in the picture below be correct? Or should I've sent the add() from like the Circle's lifeline (thought this seems kind of weird)?
In code, for example, the Controller would have been the one calling add, like in the picture, but I was having doubts whether I should have sent the message from the Circle's lifeline (though, again, this seems weird).
Of course it depends on your design, but what you have drawn is the usual approach.
The other approach (with Circle contacting ActiveDrawables) is sometimes used as well, e.g.
when all Circles has to be in the same ActiveDrawables,
for efficiency reasons GUIController might pass ActiveDrawables identifier to Circle to create it immediately in ActiveDrawables
if Circle needs to be always attached to ActiveDrawables you may also pass identifier like in previous point
Few things to consider about your diagram:
You don't have to number your messages. It's a technology used in communication diagram rather than in sequence diagram.
The last message seems to be a return (reply) from the previous one. You should use a different arrow for that.
Instead of Circle name the lifeline c1: Circle. Then you'll have an object c1 of type Circle. Then in add operation you can use c1 showing precisely that your passing the newly created Circle object, not just some Circle.

Sparx Enterprise Architect diagram with endpoints

I'm trying to structure a big diagram by building smaller diagrams and then connect them in the big picture. The problem i got now is that i can't figure out how to add connectors/endpoint to the diagram frame so that i can follow the arrows between the different diagrams.
Would be grateful for some help figuring this out.
You can't do that. A diagram is not an UML object per se. It's a rendering of a number of elements from the model. So you can not connect anything from inside a diagram frame to the outside.
What I did in similar circumstances was that I placed the element in question aside the frame (probably surrounded by a boundary and some explanatory text) from where I show the connectors going somewhere else in that diagram.
The "diagram frame" element type, which you can create by dragging a diagram from the element browser onto another diagram in the main view, is an EA-specific construct that has no basis in UML. Even within EA, they are strange beasts which fall somewhere between proper elements, which are shown in the project browser and can be dragged into any number of diagrams, and "pure" diagram objects which aren't shown in the project browser (such as Notes).
While you can draw connectors from one diagram frame to another in the normal ways, there is no way to create a connector going from an element within one frame, out of the frame's bounds and into another frame. This is because the elements within the frame are not actually present in the diagram which contains the frame; the frame is simply an image of the diagram it refers to.

How to add more than one execution specification on sequence diagram using Dia Software

I'm using Dia to make a sequence diagram and I need to make a lifeline with two (or more) execution specification, like the image below:
(What I want is inside the green circles)
How can i do that?
You can simply stack two Lifeline elements on top of each other. The top of the second lifeline can be connected to the end of the execution (the grey area) in the first lifeline.

UML Question about Sequence Diagram

I have a question regarding UML Sequence diagram.
Let's say we have an object Customer, KioskUI, KioskService and the KioskService has the last process called showNotification(); does the method showNotification goes to the Customer object or KioskUI?
If KioskUI, does the object have to return a variable to the Customer object as "<----- notification", or we no longer have to return something from the KioskUI to the Customer?
Since sequence diagram only focus on how process operates with one another my other question is, is a tangible object like a printed report is no longer needed to be shown in the sequence diagram or does it have to?
In object oriented systems it is good to see sequence diagrams as depictions of objects sending messages to each to communicate.
Arrows in these diagrams show the sender/receiver relation between objects in time, where the label for the arrow depict the message itself, e.g. a method call with arguments.
You are asking if the backwards arrow should point to KioskUI or the Customer object. The answer is simple, it depends on who sent the message, e.g. where will the method call "showNotification()" return. You have to decide this, but I guess KioskUI is a natural choice.
So the answer is, you should show the backwards arrow to the Customer only if there was an forward arrow from Customer (this should be depicted using the box on the lifeline unless it was an asynchronous call).
What is needed to be depicted in a diagram is always a choice depending on your need and UML makes no difference as long as it is a Classifier I guess, which means anything which can have an instance can be there - classes, components, actors, nodes,... For example I saw many use case realizations done as sequence diagrams with actors as objects with lifelines.

Resources