Book a Demo

Author Topic: WARNING: Aggregations vs Aggregate Asscociations  (Read 12379 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
WARNING: Aggregations vs Aggregate Asscociations
« on: June 07, 2005, 01:19:17 pm »
Question:  When is an aggregation NOT an aggregation?

Answer:  When it's an association with aggregationKind not equal to none.

EA, for reasons best known to itself makes a distinction between an association with the aggregation: field set to shared or composite and an aggregation.

What distinction you ask?  Aren't they the same thing?

Well, that depends...  The UML2 specification says:  
Quote
An association with aggregationKind = shared differs in notation from binary associations in adding a hollow diamond as a terminal adornment at the aggregate end of the association line. The diamond shall be noticeably smaller than the diamond notation for associations. An association with aggregationKind = composite likewise has a diamond at the aggregate end, but differs in having the diamond filled in.  (ptc-04-10-02.pdf)
But what would they know?   ???

It turns out, that if you draw an aggregation by dragging the "Compose" or "Aggregate" toolbox elements onto the diagram - you create an "aggregation" element (with the aggregation diamond at the target end).  If you change the aggregate field on the target end to to "none" the diamond remains.  Change the aggregation on the target end to composite.  Black diamond.  Change the aggregation to none - unfilled diamond.  Change the source to composite, the diamond switches to a filled diamond at the source end.  Change the source aggregation to none - unfilled diamond appears at the target end... ::)

NOTE: your experience may vary it is not certain that the same sequence of events will yield the same result.  However, the upshot is that the visual picture you see on the screen may bear NO relationship to the settings you have made within the element.

Now, draw an ordinary association.  Change the aggregation at either end.  The aggregate diamond appears at the desired end.  If you then change the aggregation on the other end to other than none you get this magical "double ended" aggregation - UML compliant?  I think not... :o

Another difference between the the "aggregation" and the "aggregate association" is the treatment of navigability arrows.  I won't go into details here, but suffice to say they behave differently...

It would appear that XMI import from other tools treats an "aggregation" as an aggregate association, whereas an XMI import from EA treats it as an "aggregation".

Can anybody tell me how I'm supposed to model consistently in such an environment? >:(

Based on the experimental evidence above, would you advise using EA "Aggregations" or sticking to "Aggregate Associations" as defined by UML? :'(

Paolo

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

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: WARNING: Aggregations vs Aggregate Asscociatio
« Reply #1 on: June 07, 2005, 04:56:34 pm »
Quote
this magical "double ended" aggregation - UML compliant?  I think not...


Perhaps, perhaps not.

At a classifier level it is nonsensical.  However, (and this is a quick thought, not thought too far through)  consider two instance elements of type "dataset".  Is it not conceiveable that an attribute common to each dataset could exhibit this schizoid association?

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: WARNING: Aggregations vs Aggregate Association
« Reply #2 on: June 07, 2005, 06:38:04 pm »
Quote

Perhaps, perhaps not.

At a classifier level it is nonsensical.  However, (and this is a quick thought, not thought too far through)  consider two instance elements of type "dataset".  Is it not conceivable that an attribute common to each dataset could exhibit this schizoid association?

bruce


bruce,

verily thine own lips hath spoken....  in your example you have an (ordinary) association between the two... ;D

Have you tried to play with the aggregation link yet?  You can place bets on whether the actual behaviour will match what you think will happen...

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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: WARNING: Aggregations vs Aggregate Asscociatio
« Reply #3 on: February 02, 2010, 11:42:07 am »
See: Aggregation and Association proposal for a proposal to provide consistent processing and rendering of EA Aggregations, Compositions and Associations.

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