Book a Demo

Author Topic: Elements, Packages, Classifiers and Instances  (Read 4377 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Elements, Packages, Classifiers and Instances
« on: December 05, 2019, 12:26:34 am »
AFIK Sparx creates relationships between
  • packages and the elements they contain
  • (classified) elements and their classifiers
  • (instantiated) objects and elements being instantiated

Is there are a way to graphically surface those relationships in a diagram?

Please note the word "graphically", I am aware that text can be used for this.
« Last Edit: December 05, 2019, 12:32:29 am by Modesto Vega »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Elements, Packages, Classifiers and Instances
« Reply #1 on: December 05, 2019, 12:47:12 am »
No, these relations are not stored as "connector" and thus cannot be visualized in a diagram.
(unless you create actual connectors for these relations)

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Elements, Packages, Classifiers and Instances
« Reply #2 on: December 05, 2019, 01:02:37 am »
Thanks Geert, I thought so.

As a result, I am assuming that, out of the box, it is not possible to create a matrix with packages on the columns and non-package elements in the rows.

So is there a way to automate the creation of connectors representing this relationships.

What would the appropriate relationship? Traces for everything? Composition for elements to package? Generalisation/Specialisation for classifier/instance?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Elements, Packages, Classifiers and Instances
« Reply #3 on: December 05, 2019, 01:12:52 am »
Sure, writing a script to do this is rather easy.

For the relation between package and ownedElement, you can use the nesting connector.

For Instance->Classifier I would use a dependency (or a stereotyped dependency)

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Elements, Packages, Classifiers and Instances
« Reply #4 on: December 05, 2019, 04:32:42 am »
  • packages and the elements they contain
Not correct. Connectors are only between elements. It happens that packages have an associated element and they are linked in multiple ways (I'd guess EA mostly relies on the fact that both share the same GUID, though in different DB tables).

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Elements, Packages, Classifiers and Instances
« Reply #5 on: December 05, 2019, 05:15:49 am »
  • packages and the elements they contain
Not correct. Connectors are only between elements. It happens that packages have an associated element and they are linked in multiple ways (I'd guess EA mostly relies on the fact that both share the same GUID, though in different DB tables).

q.
Qwerty I am aware of Sparx dual personality package, as an element and as folder. The intention is to link the package element to the elements it contains. Minus the script, this appears to work fine using a nesting relationship as suggested by Geert.

Are you suggesting that nesting relationships cannot or should not be created between a package element and the elements it contains? Are you suggesting that package elements do not contain any elements?

I should have written
Quote
Package elements and the elements they contain
instead of
Quote
Packages and the elements they contain

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Elements, Packages, Classifiers and Instances
« Reply #6 on: December 05, 2019, 06:47:46 am »
Your correction is fine. No more complaints ;-)

q.