Sparx Systems Forum
Enterprise Architect => Uml Process => Topic started by: Paolo F Cantoni on May 29, 2006, 02:32:01 am
-
It seems to me that there is some functionality missing from EA regarding the mapping of Association Roles to Attributes and vice versa.
In another post, I've noted a BUG wherein the Features are not spell checked. Consequently, even if the Association Role was originally synchronised with the Attribute, it can get out of synchronisation due to this bug.
However, when I tried to get around the problem by resetting the Attribute name manually, the "linked" Target Role did not change!
How do I know it's linked? Well, EA provided me with a drop-down for this purpose.
Now, I know I can override this name with my own, but if I don't, aren't I implicitly requesting the link?
What EA didn't do was to formalise that linkage.
UML specifically states that a named, navigable, Association role IS an Attribute. So, notwithstanding that EA doesn't directly implement this, it should still maintain the name linkage.
Thoughts?
Paolo
-
No thoughts, other than I agree with what you are saying.
About a year ago I was working through an implementation of the CWM. We were being faithful to the OMG reference model, which relies heavily on the linkage between roles and attributes.
What I can say is that having the explicit linkage, and having it remain in synch, would be a life saver when working with metamodels. It would have saved me numerous hours, the building of at least one add-in (that did not otherwise need to be there), and considerable angst about whether I'd caught all typos and changes.
David
-
[glb]WARNING WARNING WARNING - Will Robinson![/glb]
I've just discovered that you can have multiple Associations mapping to the SAME Attribute!
This surely is WRONG?
Needs to be fixed!
Paolo
-
Interesting - I dont think this is wrong. Consider a type heirarchy - you may want to model the association at various levels of the heirarchy for some arcane purpose.
b
-
Interesting - I don't think this is wrong. Consider a type hierarchy - you may want to model the association at various levels of the hierarchy for some arcane purpose.
b
I do that by creating derived Associations (again, not directly supported by EA). The attributes are therefore also derived.
However, that isn't the case here. They are to different Classes altogether.
-
I just hit exactly the problem Paolo described initially in this thread.
To put it short: I can edit both the target role of my association and the name of the attribute the association is linked to (via it's target role) - but the changes are not reflected in the linked property! In other words, although the association is explicitely linked to an attribute, EA completely disregards this link wrt manual changes!
Still using EA 6.5 build 803.
Has this been fixed in a newer build?
-
I can edit both the target role of my association and the name of the attribute the association is linked to (via it's target role) - but the changes are not reflected in the linked propertyStill using EA 6.5 build 803. Has this been fixed in a newer build?
I am using the latest build (7.0 build 816) and this is still an issue. I ran into this problem yesterday and am still trying to find a workable solution.. This is going to cause us a lot of grief until it is fixed.
-
I meanwhile reached the surface to look over this. I have a quite simple problem here. Why should one declare an Attribute AND create an Association named with that Attribute? Isn't it that naming the end role of an association makes this an attribute per se? If so (and it seems logical to me) then why am I offered attribute names in the end role drop down? What would be the reason to do that?
-
I meanwhile reached the surface to look over this. I have a quite simple problem here. Why should one declare an Attribute AND create an Association named with that Attribute? Isn't it that naming the end role of an association makes this an attribute per se? If so (and it seems logical to me) then why am I offered attribute names in the end role drop down? What would be the reason to do that?
Yes you are correct.
Since the original posting, I've come to the view that we need to see the attribute and the association as two renderings of the same "fact". Consequently, the user should be able to decide (on an attribute specific basis) whether to show the attribute, the association or both. Changing one should change the other!
Paolo
-
Good to hear that from you. That gives it an extra weight :)
So it's sort of: Create an attribute of type SomeClass and if SomeClass appears on the diagram as well then render an association (automatically) or tell EA to do so via some switch. And vice versa if one creates an association then there should appear an according attribute.
Currently I'm doing quite a lot XSD/UML mapping. The only thing I'm missing is some sort of anonymous attribute (where XSD uses a "ref="). As a work around I name the attributes and roles as "(num)" where num is a unique counter in the schema and add a tag anonymousRole.
-
IMHO you are seeing yet another aspect of the same root problem. I like the solution Paolo proposes. [Which is itself another projection of the same issue of course.]
Sparx would reap huge benefits in extended server life as the number of posts relating to attributes and roles dropped off.
David
-
IMHO this should not be a problem. By defining both an attribute and an association your documenting a feature of your system redundant. Offcourse we all know that we should avoid redundancy.
I see this as a difference between two levels of models.
If I'm defining an abstract PIM like UML model I use associations, and not attributes.
If I'm defining a UML representation of programming code (PSM like Model) then I use attributes and no associations.
So no redundancies, and no issues in keeping them in sync.
-
But associations give you a clearer picture of how classes relate to each other. Taking them out in PSM would not be of much help, I think.
-
But associations give you a clearer picture of how classes relate to each other. Taking them out in PSM would not be of much help, I think.
I agree...
IF they were just two renderings of the same fact, you could render them at will... [ ] Show Attributes only, [ ] Show Associations only, [ ] Show both Attributes and Associations
It could get more flexible than that - but that would be a start...
-
How long have we been waiting for one of these starts? In the very beginning there was that joint action with Marcello (lost in Chile) where a lot of the legwork was already done but in the end nothing really happened. Sparx seems to be more focused on putting on a new wax coating rather than tuning the motor.
-
Regardless of what the relative priorities at Sparx are (or where) this continues to rear its head. Yet another possible example has come up in an ongoing thread in this forum section. [
I'm not going to try to find the URL - and possibly trash this post - but it shouldn't be too difficult to find.]
[EDIT: Here it is: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1209482863]
David