Sparx Enterprise Architect diagram with endpoints - diagram

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.

Related

Class Diagram to Sequence Diagram Rule

I have a specific question about this conversion. I saw different examples and I am confused at this point: Do I have to draw all classes in class diagram while drawing sequence diagram?
No, you don't have to do that. A class diagram shows a static view of a system. And it only shows that part of the system which is relevant. Only very small systems go into a single diagram. For large systems you create multiple sub-domains you can represent in a single diagram. Wall papers are more or less just for the show.
A sequence diagram in contrast shows actual behavior of the system. And again a SD will not show the complete behavior of the system. That even more than class diagrams since behavior is exponentially more complex than anything static. So for a SD you will highlight only a certain part of behavior where only certain classes of the system take part in the communication. And even then you are allowed to leave away parts of the communication if they are not really relevant for what you want to show. A SD is created to highlight only some part of the behavior. In that respect you create as many SDs as needed.
As commented, what you put in a SD are lifelines which represent instances of a class, not the class itself.

Dragging nested components into a diagram in Sparx Enterprise Architect (EA)

In my Enterprise Architect model, I have nodes that contain devices that contain components that contain other components. That's how I organized the hierarchy in the Project Browser.
I would like to be able to drag one element of the model into a diagram (as a Link), and be able to see all the elements contained by this element without having to drag them individually. For example, dragging a device into a deployment diagram would display the node and all the components it contains.
This logic works when I drag a component onto a diagram: I am able to select what children elements (interfaces, ports, ...) I want to see on the diagram. But I did not find a way to do the same with this following containment hierarchy: node > device > component > subcomponent.
Is there a way to do so ?
Thank you :)
You can do it manually, of course. Dragging the outermost onto the diagram (as link) and enlarge it. Drag the inner ones onto the diagram somewhere outside the outer one (to avoid some dialog otherwise). Drag them inside the outer and arrange as needed.
Another way is to make the outer element composite (context/Add/Composite diagram or /New Diagram/Composite). On this composite diagram place the inner elements and arrange them. Save the diagram when done. Now you can create diagrams with the outer element which, once enlarged, can show the composite diagram inside. Just drag the composite diagram as Diagram Frame and eventually make it smaller. Then place it inside the enlarged outer component.
While in the first case you can show relations (like port delegation) this is not possible in the second one.
There is no way to automagically drop the nested structure except you come up with some very tricky add-in.

Which UML Diagram is suitable ? Two object interacting, and one is changing the state of other

My requirement : I want to come up with a suitable UML diagram based on the case which is described below. I need to know which UML will best suit this condition.
The case : Two object A and B in the form of "Application Forms" interacts with each other.Certain event in object A triggers a state change of object B.Both object interacts with each other for a Use Case.
I tried using State Diagram but it fails as here 2 object interact with each other to change the state of one object, whereas State diagram is suitable to depict state change of one object only without showing interaction with another object which is causing state change.
My requirement is to show both interaction and state change together in the same diagram.Is it possible?
Any suggestion on this which UML diagram is suitable for this?
UML uses two different diagrams for each behavior, one for State (State Machine Diagram) and one for Interaction (could be the communication diagram or the sequence diagram).
Since the Interface of a class doesn't change when it's state changes (by applying the State Pattern for example), the interaction should not really change from the perspective of the caller, sure, internally all kinds of things might be going on, but that should not really matter.
The way I'd model this is to describe which states your objects are in and which scenario will play out. That will result in a few interactions and possibly state changes. Then pick a new scenario, either using the end-state of the previous one as a starting point, or describing a new starting state.
That way each scenario is clearly defined, the interaction diagram shows how the objects interact, and multiple State Diagrams with the active state highlighted can show the changes in state and thus behavior of the different objects.
There is no diagram that gracefully combines both, since one (the state machine) is a static diagram, showing all possible options, while the other describes the interaction.
Sure you could play around with creative naming, as suggested (ObjectA/State) as your different objects in the interaction type diagrams, but it would not result in a very clear picture. What you're trying to describe here is a story, a sequence of events and how those events impact the different states of the objects. So your scenario's are the story on a high level, the communication diagrams the stories on a much more detailed level and the state machine diagram the snapshots of specific situations.
Model your states in the state diagram as such: (Object / ObjectState).
For example:
States (A/uninitialized) , (A/initialized), ...
Should work then.
State diagram, sequence diagram, communication diagram and the whole answer by #jessehouwing is fine, but I think there is an easier and more natural way:
(1) http://agilemodeling.com/style/activityDiagram.htm, Figure 3. Submitting expenses
Note that this is UML 1.4 activity diagram. Current UML notation is slightly diferent. Dashed lines represent Object flow : Chapter 3.90.2.2 Object flow ...Objects that are input to or output from an action may be shown as object symbols. A
dashed arrow is drawn from an action state to an output object, and a dashed arrow is drawn from an input object to an action state. The same object may be (and usually is) the output of one action and the input of one or more subsequent actions...
and (2) http://www.uml-diagrams.org/document-management-uml-activity-diagram-example.html
show an examples of how you can combine object states and UML activity diagram. The pictures are activity diagrams and the orange rectangles highlight points where objects with states (the part in [some state]) are shown. The purple rectangles show authors who were robbed.

Visio 2010 UML Sequence diagram - lifeline does not have enough connectors

I am using Microsoft Visio 2010.
I am drawing a UML sequence diagram.
I added object Lifeline and started drawing diagram. Because the diagram is very long, at one point there would not be any more connectors to connect the arrows to. See this picture:
I understand that probably it is not good idea to put so many processes on one diagram, but it seems to me to be the best way to describe the whole process. And I only need a bit more space to continue the diagram!
So, how to configure the lifeline to have more connectors?
You can read how to add more connection points at "Add, move, or delete connection points". This will allow you add connection points for the propose of creating the diagram however I don't know if this is sufficient for the UML model to know the source and destination of messages. This may be an issue if you are exporting the UML model to code or another tool.

"Pointer" to class to shorten class diagram

Learning UML, I'm facing a problem with the arrows to classes.
For example, I have this diagram:
As you can see, it's kind of a mess. How is the notation to "reference" a class to another part of the diagram, so I can avoid drawing the arrows? I would like it to be like the following diagram, but keeping the information about the inheritance of the classes.
Any information or alternative will be helpful.
If you use newly done UML tools you should be able when you move the classifier and see the link to move at the same time.
I mean you click on the classifier in order to select it and then move slowly with the mouse

Resources