Book a Demo

Author Topic: Stereotype definition for Aggregation and Composition  (Read 6933 times)

Eran Peleg

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Stereotype definition for Aggregation and Composition
« on: April 15, 2016, 01:38:21 pm »
Hi
The goal - to have the Aggregation and Composition relations with the Diamond at the "source" side and an arrowhead at the "target".  The line style should be Orthogonal-Square (orthogonalS).  It should be operated using the Quick-Linker mechanism.
Any idea?
Thanks
Eran

 

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Stereotype definition for Aggregation and Composition
« Reply #1 on: April 15, 2016, 01:51:41 pm »
Create your own MDG.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Stereotype definition for Aggregation and Composition
« Reply #2 on: April 15, 2016, 03:16:56 pm »
Hi
The goal - to have the Aggregation and Composition relations with the Diamond at the "source" side and an arrowhead at the "target".  The line style should be Orthogonal-Square (orthogonalS).  It should be operated using the Quick-Linker mechanism.
Any idea?
Thanks
Eran
If you really want to, as Glass boy says, you'll need your own MDG.  But I would advise against it (being held as such in the repository) since it violates one of the premises of good modelling.

If you wan to "draw" the relationship so that it ends up with the diamond at the item you started to link from and th earrow at the item you connected to, then EA provides the ability to control the relationship between what you draw and what ends up in the repository.

See:  Tools | Options | General | [X] Draw Aggregations Reversed

Setting and unsetting this will change the behaviour.  I think one or the other should suit you.

As to the default Line Style,  I've just done the same for my MDG - if you are using one of the existing MDGs (for example ArchiMate 2)  you can edit the supplied MDG to make orthogonalS the default line style:
Code: [Select]
<Apply type="Composition">
<Property name="_lineStyle" value="orthogonalS"/>
</Apply>

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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype definition for Aggregation and Composition
« Reply #3 on: April 15, 2016, 03:57:09 pm »
You could also run a script/addin to change source/target to what you (and I) would expect.

Using the free add-in EA-Matic you could even run that script the moment the connector gets created.

Geert

Eran Peleg

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Stereotype definition for Aggregation and Composition
« Reply #4 on: April 22, 2016, 05:46:48 pm »
Hi EAs experts
Sorry I didn't say in the beginning - I'm writing my own MDGs for EA.  The question is about definitions of Association, Aggregation and Composition within the Profile model for MDG.
The Line Style of orthogonalS works OK.  The problems are with the location of the diamond and the appearance of the arrowhead at the right location (Navigability and Non-Navigability definitions in the Association properties of the Stereotype seems like having problems).
Any experience ...?

Thanks
Eran

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype definition for Aggregation and Composition
« Reply #5 on: April 22, 2016, 05:59:02 pm »
I guess you have to experiment with diamonds since EA offers a contextual creation of the diamond on both sides for native compositions. Probably this is kept with stereotyped ones, but as said: try and error is your friend.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype definition for Aggregation and Composition
« Reply #6 on: April 22, 2016, 06:02:17 pm »
I think you better stay away from the native Aggregation and Composition and only extend Association.
Otherwise you get connectors of type Aggregation in the database which causes all kinds of weird issues (like the one with the Schema Composer I discovered this week)

You might need to use an add-in or script to get the the AggregationKind and Navigability set to your liking.


Geert