This is a proposal for the consistent treatment of UML Associations with and without AggregationKind within EA.
(Because of its length, it is split into two parts...)
Firstly, we need to recognize that UML doesn't have what EA calls "Aggregations" and "Compositions". UML has Associations with shared or composite aggregation. However, we
can use these terms to identify these subtypes of Associations.
In another post
Allow replacement of EA Aggregations, I mention the formal replacement of EAAggregations and EACompositions with true UML Associations (and, I guess, that should probably be the eventual aim). However this proposal takes an intermediate stance - retaining "Aggregations" and "Compositions" but attempting to provide a degree of consistent behaviour that would make it easy to (eventually) replace them with true Associations should that be the requirement.
In a further post
AggregationKind - one end concept?, I suggest that AggregationKind can, by definition,
only be applied to one end of the Association at a time.
In EA, although in some contexts, we can talk of
Aggregations and
Compositions, there is actually only
one type of arc - with type "Aggregation" that covers both forms. It does this by means of the subtype "Weak" for shared aggregation and "Strong" for composite aggregation. The subtype is automatically maintained by EA - depending on the AggregationKind state of both ends.
At present in EA, you can create an arc of type "Aggregation" with
both ends set to AggregationKind none and EA will still render as though it was a shared aggregation (and is so designated by its subtype in
t_connector). In addition, as mentioned elsewhere, you can set both ends of the arc to AggregationKind set to not none and EA will render the the AggregationKind diamond on one end
only - according to an internal Algorithm. Arcs of type "Association", on the other hand will render both ends if AggregationKind is set. This is, of course, inconsistent and confusing.
My proposal take the form of connecting the processing of the two type of arcs: "Aggregation" and "Association" so that a EA can provide a consistent representation and rendering.
The first part of the proposal is to ensure that EA ONLY allows AggregationKind to be set on one end of the arc. The last change to AggregationKind would determine which end had the AggregationKind diamond.
The second part is the "unification" of both types so that an arc can change its type depending upon the settings of AggregationKind. If both ends of the arc have AggregationKind set to none, the arc's type is set to Association. If either end of the arc have AggregationKind set to not none, the arc's type is set to Aggregation. The arc's subtype is set depending upon the setting of the only AggregationKind status.
In this way, EA presents a consistent view both in rendering and within the database. Also, querying if the arc is an aggregation or not is simplified.
Naturally the Automation Interface would respond consistently.
As currently, there will need to be a global setting to control which end of the arc, the AggregationKind diamond is to be placed when drawing the arc (using either the Toolbox or the QuickLinker). The current
[X] Draw Aggregations Reversed would be replaced with
[X] Draw Aggregations at Source. EA would, by default, draw the AggregationKind diamond at the destination end - as at present.
[End of part 1]