Book a Demo

Author Topic: Aggregate Relationships From Classes To Components  (Read 14722 times)

DBRN

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Aggregate Relationships From Classes To Components
« on: December 30, 2014, 12:43:20 am »
Is it possible in Enterprise Architect, when making a relationship from a class in one (packaging)component to a class in another component, that the relationship affects also the components of source and target classes?

In other words, that when you put the components into a diagram, the same relationship is displayed between them as the one between the classes inside? Of course the goal is having only one relationship, so when you delete the relationship between the two classes the relation between the components disappears too.
« Last Edit: December 30, 2014, 12:55:23 am by cafebabe »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Aggregate Relationships From Classes To Compon
« Reply #1 on: December 30, 2014, 01:58:14 am »
To be honest I don't get the full context ;)

But in EA each relation is per two elements. The diagram just shows that relation per default (if both related elements are on the diagram). If you so wish you can tell each diagram to suppress the display of individual relations.

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: Aggregate Relationships From Classes To Compon
« Reply #2 on: December 30, 2014, 05:52:03 pm »
I think I get it.
suppose ComponentA contains ClassA and ComponentB contains ClassB.
And suppose ClassA depends on ClassB.
In that case you would like EA to show a dependency from ComponentA to ComponentB right?

If this is what you are after then, no out of the box that is not possible.
EA will only display relations between two elements as stated by qwerty.

So if you want to show a dependency between ComponentA and ComponentB then that dependency will actually need to exist.

But, you could write some kind of add-in or script to create these dependencies between the components. Seems simple enough. You just iterate the elements in Component A, iterate their dependencies, and add a dependency to the owning component.

If you do it in a add-in you could even do it on the fly when adding/removing dependencies between classes.

Geert

DBRN

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Aggregate Relationships From Classes To Compon
« Reply #3 on: December 31, 2014, 12:29:36 am »
Quote
I think I get it.
suppose ComponentA contains ClassA and ComponentB contains ClassB.
And suppose ClassA depends on ClassB.
In that case you would like EA to show a dependency from ComponentA to ComponentB right?

If this is what you are after then, no out of the box that is not possible.
EA will only display relations between two elements as stated by qwerty.

So if you want to show a dependency between ComponentA and ComponentB then that dependency will actually need to exist.

But, you could write some kind of add-in or script to create these dependencies between the components. Seems simple enough. You just iterate the elements in Component A, iterate their dependencies, and add a dependency to the owning component.

If you do it in a add-in you could even do it on the fly when adding/removing dependencies between classes.

Geert
Thanks for clarifying it. That's basically what I doing now; I just wanted to make sure there was no easier way so all the work is not wasted.