How to show name of choice elements in StarUML? - uml

I'am creating an statechart diagram in StarUML and I want to show the name of choice elements in the diagram, but I don't know how to do it without adding a text annotation.
Do you know if it is possible?
Thanks!

(...)
Showing names of control nodes (including decision, merge, ...) diagram is not supported. It was never supported in previous versions, even in V1. Typically just show the guards of the control flows connected to the decision node, instead of showing the name of decision node. At this time, we recommend to use "Text" or "Note" annotation.
(...)
Thanks,
StarUML Team
This was the answer about the same question in this forum. Take a look.

Agree with #Victor, I just add Text Element inside the Choice Element.

Related

UML of use case diagram correct? Extension or generalization?

I have been trying to understand it but I couldn't. Can someone explain this shortly? Is there some problem with this UML diagram? If there is, where?
I thought that instead of extending arrows there might be a generalization for the pic, video, tag names, and feeling use cases. And I think that included arrows should have been dashed. Are these true? Thank you already.
You can not understand this since it is absolute nonsense. This is some semi-activity diagram. A use case is about actor goals, not how to do something. Please give the author of that a heavy kick in the rear. Or if you not that rude as myself (being a pacifist with empasis on fist - haha) just encourage them otherwise to start learning about use cases.
As always I recommend reading Bittner/Spence about use cases.
The following aspects of the diagram violate the UML specifications:
The boundary box shall represent a system (e.g. Facebook), not a function (Add Status).
Keywords include and extend shall be written in guillemets: «include», «extend».
The «include» arrows shall be dashed.
The «include» arrows shall have open arrow-heads.
To apply the use case technique in a project, the team shall agree on a specific methodology and/or philosophy. UML doesn't offer this, it is just a language (despite some definitions in the UML specification that point in a certain direction). Therefore, I will not give my opinion on whether this is a proper way of use case modeling.
With regard to generalization versus extension: both are possible in this case. If "Add Status" would mean: add pic or add video or etc., then a generalization would be more appropriate. The extension suggests that "Add Status" means: add pic and/or video and/or etc. In other words, each extending use case extends the original with additional capabilities.

Unbind Objects in Sparx Enterprise Architect

I have a class (let's call it "CLASS") in two different EA diagrams.
CLASS is the same object in both diagrams.
I want to change the attributes order in one diagram without it automatically changed in the other diagram too.
Any ideas?
Thanks.
That depends on what you want. Do you want to show different aspects of the same element in the two diagrams then you can play with the Feature and Compartment Visibility (Ctrl-Shift-Y)
If you want to show different elements, but one starting as a copy of the other then you can Copy the element (Ctrl-C) and Paste as duplicate (Ctrl-Shift-V)
You can not do that. And it does not make much sense to hide single attributes or methods of a class in specific diagrams. Either all or nothing (to show just the class). EA has a way to hide single stereotyped element parts for a whole diagram. But that's not what you're looking for.
Maybe you can explain WHY you want to do that.
No, you can't do that. As you note, it is the same element (avoid using the term "object" here; object is actually a type of element in UML, just like class, component, use case, etc).
Attributes can either be sorted alphabetically (by default) or in some custom order which you set manually, but EA stores this order with the class, not with the diagram. In other words, the attributes of one particular class will always be displayed in the same order in all diagrams.
New users often find this type of issue confusing or even frustrating, until they realize that a diagram is only a visualization of the underlying model data -- it is not a drawing. This is why you don't do search-and-replace in models: you make a change to an element in one place and it is immediately reflected wherever else that element is shown.
The only way to show two different attribute sort orders is to make a copy of the class, but then of course it's not the same element anymore.

Relationships on attribute level in Enterprise Architect

I am looking for the best solution to draw mapping diagram in EA. I find that composite structure diagram might suits my needs. I have even found good example of such diagram on the net:
(Original source: http://www.dthomas.co.uk/dtalm/images/eshot/test/data_map.JPG)
This diagram was fully created in EA (as author claims). However I am not able to attach 'represents' relation to the attribute. Does any one know how to do that (I am talking about those little open squares in class representations).
Thank you in advance for your answer.
Good question!
I found your answer in Google Groups:
draw a dependency from one class to the other.
Then Right Click on the left side of the dependency and chose Link to Element Feature, chose Attribut and then select your attribute.
On the right side the same procedure.
On my EA 10 (Corp.Ed.), I was able to reproduce the described steps. See attached image.
I just downloaded EA and created a simple example by creating :
one class with a part
one collaboration with also a part
one 'represents' relation by using the command highlighted
Hoping it helps,
EBR.
PS: it is out of the scope of your question but what is the goal of this mapping diagram? It is just curiosity..

Confusion about how attributes work in UML Class Diagrams

I've taken the course Object Oriented System and Design at Stockholm University. I had to hand in an extra assignment where I had to create a UML Class Diagram reflecting a web site that sold cars (this is not a thread where I'm asking you to do my homework). This is what I handed in:
The teacher said that "this isn't how you use attributes" and seems reluctant to explaining what I should have done differently. It's all in Swedish but I think that the main points are clear regardless of language.
My question is: How should this have been modeled differently? I have aggregation for some objects, enums because the website had a limited amount of attributes for some classes.
Any help is greatly appreciated.
Kind regards,
Hugo
I see some problems in your diagram:
I believe you have some enumerations in your diagram that are not defined properly. An enumeration should look like this.
You define attributes in addition to aggregation (e.g. the Bil has a aggregation relation to this SäkerhetsTilägg, and additionally defines an attribute säkerhet. You should either use a relation or an attribute, see here.
While we are at this, the multiplicities are somewhat confusing. You say that Bil can have any number of SäkerhetsTilägg, while the attribute säkerhet holds exactly one SäkerhetsTilägg.
Afaik, you have to define the visibility of attributes and methods (like +, - etc).
It looks to me like you've got your Enumerations modeled as Classes. Even though visually an Enumeration looks like a Class with an <> stereotype, it's really a different thing altogether and it has EnumerationLiterals in the compartment when Attributes would be for a Class.
In ArgoUML you can create an Enumeration using the fourth button from the right on the toolbar. It's a dropdown menu which defaults to creating a new Datatype, but if you pull it down and select the green rectangle, it'll create an Enumeration. Create your Enumerations first and they'll be available for you to select as the type for your Attributes.
The final result should look like this:

How to mark classes as Obsolete on UML

I have a few classes on my UML diagram which should not be used, but still available.
Is there any way to mark these classes as obsolete?
I've seen <> notation somewhere, but can not find how to use it in MS Visio 2003.
And another question. Should these classes be on UML diagram at all? I can imagine answer on this question would be on "per case" basis, but I'm interested in hearing general opinions. And if you put obsolete classes on your UML diagrams, why you did it? or why not?
Thanks!
It's not clear to me what you mean by " should not be used, but still available.". If they need to stay in the diagram but you want to visualize that they are now obsolete you can create a new stereotype <> and use it to annotate the obsolete classes.
If you don't really need them in the diagram then use a version control system for models as duffymo suggested. A list of version control tools for modeling elements can be founde here
I think if you're going to take the time to update the UML, the best idea is to remove it from the model. Leaving a bunch of "obsolete" diagram elements hanging around makes as much sense as keeping commented code in a version control system. Let the version control system manage the history.
I think that your model should include all your project and then you extract views from your model. If a class is not having any value in a specific view then this class should be removed from your class diagram view diagram but not from your model.
If you want to keep this class in your diagram then you can add a small comment (usually yellow square) or change the color of the class. I usually use green for class and then change the color to grey/green almost invisible but still visible color for non strategic classes.
Hope this help.

Resources