Author Topic: Ability to move the link of an association class  (Read 511 times)

WarrenKenyon

  • EA Novice
  • *
  • Posts: 13
  • Karma: +1/-1
    • View Profile
Ability to move the link of an association class
« on: August 23, 2017, 04:09:38 am »
The inability to move the link of the association class (the dotted link between the association and the class) is highly annoying.  It prevents the ability to make readable diagrams that use this highly useful UML element. On the contrary, the association diamond, which gives the desired behavior to move the link, is much less useful modeling-wise. 

Glassboy

  • EA User
  • **
  • Posts: 896
  • Karma: +52/-54
    • View Profile
Re: Ability to move the link of an association class
« Reply #1 on: August 23, 2017, 01:04:13 pm »
Yes I sent a very angry email to Sparx about it last year.  It still makes me grrrrrrrr.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5875
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Ability to move the link of an association class
« Reply #2 on: August 23, 2017, 05:16:09 pm »
What is the mechanism for the Association Lozenge (Diamond) to become an AssociationClass for a relationship?  I can do for a Class via the context menu, but there's no corresponding context menu entry for the Lozenge.

The reason you can't move the AssociationClass link to a normal Class is that it is virtual (it's not implemented as a real entry in t_connector).
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Uffe

  • EA Practitioner
  • ***
  • Posts: 1072
  • Karma: +81/-5
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Ability to move the link of an association class
« Reply #3 on: August 23, 2017, 05:54:48 pm »
The reason you can't move the AssociationClass link to a normal Class is that it is virtual (it's not implemented as a real entry in t_connector).

Right. It's not even a NoteLink. It looks like it's purely visual and has no backing representation in the database.

Quote
What is the mechanism for the Association Lozenge (Diamond) to become an AssociationClass for a relationship?  I can do for a Class via the context menu, but there's no corresponding context menu entry for the Lozenge.

The N-ary Association is a weird beast. It too seems to be be the subject of some behind-the-scenes fancy footwork -- it's stored in t_object, but behaves neither as a Classifier nor as an Instance. But you shouldn't use it as an Association Class anyway: the Association Class represents an association between two elements where the association also has some Class-like properties, while an N-ary Association is an association between multiple elements.

/U
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 8961
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Ability to move the link of an association class
« Reply #4 on: August 23, 2017, 06:02:08 pm »
See figures on pp. 205/206 in the specs. The lozenge seems to be a placeholder for the connection point.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5875
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Ability to move the link of an association class
« Reply #5 on: August 24, 2017, 09:49:15 am »
See figures on pp. 205/206 in the specs. The lozenge seems to be a placeholder for the connection point.

q.
In the 2.5 Beta it is on page 211.

As indicated (if it's the same diagram) the (n-ary) Association Lozenge is an AssociationClass in itself.  It should not be used as a substitute for the connection point of the (binary) AssociationClass virtual link (BTW, Uffe, there is a backing representation in the DB - but not as an arc of any kind).  These days, if you really want to have a "moveable feast" for the connection point, use a Notelink from the association to the AssociationClass.  This gives you a REAL arc which you can customise to your heart's content.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

WarrenKenyon

  • EA Novice
  • *
  • Posts: 13
  • Karma: +1/-1
    • View Profile
Re: Ability to move the link of an association class
« Reply #6 on: August 25, 2017, 02:50:01 am »
See figures on pp. 205/206 in the specs. The lozenge seems to be a placeholder for the connection point.

q.
In the 2.5 Beta it is on page 211.

As indicated (if it's the same diagram) the (n-ary) Association Lozenge is an AssociationClass in itself.  It should not be used as a substitute for the connection point of the (binary) AssociationClass virtual link (BTW, Uffe, there is a backing representation in the DB - but not as an arc of any kind).  These days, if you really want to have a "moveable feast" for the connection point, use a Notelink from the association to the AssociationClass.  This gives you a REAL arc which you can customise to your heart's content.

Paolo

Except that that is not optimal either, from the semantics point of view. 

When you look at the "links" of the association class, the association doesn't even show up.  So, from the UI you only know that it is an Associative Class when viewing the Diagram on which the association is displayed.  Not sure what it looks like in the object model, I haven't had to write an addin to use it.... yet.  But I want the proper semantics, not just a "nice diagram".

The modeling tool we were creating back in the day actually let the user create the association link separately.  Any class could become an associative class.  The association link itself had attributes that could be used to store information.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5875
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Ability to move the link of an association class
« Reply #7 on: August 25, 2017, 04:58:04 pm »
If you want good semantics, you need to "roll your own MDG".

We mark our Associative Elements (including Association Classes) with a Tagged Value (IsAssociative) which, in turn, causes an Associative Glyph to appear on the Element.  This means that even if the association is not visible on the diagram, the Element is known to be Associative.  Over a decade ago, there was a discussion on the forum N-Ary Associations and Association Class.

You may find this useful.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

WarrenKenyon

  • EA Novice
  • *
  • Posts: 13
  • Karma: +1/-1
    • View Profile
Re: Ability to move the link of an association class
« Reply #8 on: August 29, 2017, 07:04:29 am »
If you want good semantics, you need to "roll your own MDG".

We mark our Associative Elements (including Association Classes) with a Tagged Value (IsAssociative) which, in turn, causes an Associative Glyph to appear on the Element.  This means that even if the association is not visible on the diagram, the Element is known to be Associative.  Over a decade ago, there was a discussion on the forum N-Ary Associations and Association Class.

You may find this useful.

Paolo
Interesting. I like the decoration idea.  Did you do this with an MDG or some sort of script?  Also, did you solve the problem of being able to see what two classes it was an association between?  The object model most likely allows you to find those classes, but you cannot see them in the properties editor of the association class itself.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5875
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Ability to move the link of an association class
« Reply #9 on: August 29, 2017, 09:45:31 am »
[.Interesting. I like the decoration idea.  Did you do this with an MDG or some sort of script?  Also, did you solve the problem of being able to see what two classes it was an association between?  The object model most likely allows you to find those classes, but you cannot see them in the properties editor of the association class itself.
I left out another aspect of the N-ary (including binary) relationship model.  That is, that any AssociationEnd that provides the "key" to the n-ary Association is stereotyped appropriately.  Thus, we have REAL relationships to play with (as opposed to the merely virtual arc).  A special script draws a "recognisable" shape for it.  Because of this, you could create a special compartment in the Element to display the Elements at the ends of the AssociationEnds.  We haven't done so because there are still too many defects with the Compartment process, however there is NO theoretical reason why one couldn't.

Decorations are done in the MDG. In the shapescripts for the appropriate stereotypes.  Just detect the presence of the tagged value and draw your decoration.

HTH,
PAolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!