Book a Demo

Author Topic: Create a Repository of Elements  (Read 3425 times)

mckenng

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Create a Repository of Elements
« on: November 20, 2013, 07:59:24 pm »
I am working on creating a library of elements that I want to use across a number of different packages and diagrams. For example if I create a node object (a server in this case) I want to be able to drag and drop this across various diagrams but the dependencies in each diagram will vary and I do not want these to be inherited across the other diagrams this element appears in? Any help advice greatly appreciated as I have gone through the help files, docs etc with no clear way forward. :)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Create a Repository of Elements
« Reply #1 on: November 20, 2013, 08:41:47 pm »
If you are creating relationships on a diagram these relationships are created between those elements. The exist in the model and they are not limited to that diagram only.
So logically, any diagram that shows the two elements will also show the relationship between those elements.

What you might be after is modelling the relationships of instances of an element.
In that case you create new instances for each different diagram, and the relationships are not defined between the classifiers, but between the instances.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Create a Repository of Elements
« Reply #2 on: November 21, 2013, 09:34:13 pm »
It sounds like what you're trying to do is not so much modelling as making drawings with reusable shapes. The problem with that approach is that in UML and related modelling languages, the connectors are first-class -- they are just as important as the elements.

An EA project is a repository of elements and connectors, and a connector is no more local to a diagram than an element is; each diagram simply shows a subset of the element/connector repository. So it will be difficult to find documentation on how to achieve what you're trying to do, simply because it's not the intended use of EA.

Geert's suggestion is a good one, but in case it doesn't work for you I'll add a few words on hiding connectors.

You can switch connector visibility on and off individually in a diagram, and you can also tell EA to hide a particular connector in all other diagrams. However, when two connected elements first appear in a diagram, EA will always show the connectors until told otherwise -- 'hide in other diagrams' does not apply to future diagrams.

You could also try using diagram filters. If you give all connectors an alias equal to the name of the diagram where you want them to appear, you can then create a filter (for each) which hides connectors which do not have that alias. (Alias is better than connector name for this purpose, since the alias is not shown by default but the name is.)

Neither approach is particularly streamlined, for the reason listed above. EA is a modelling tool, not a drawing tool, and treating diagrams as individual drawings will always mean extra work.


/Uffe
My theories are always correct, just apply them to the right reality.

mckenng

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Create a Repository of Elements
« Reply #3 on: November 21, 2013, 09:41:17 pm »
Many thanks for the information I have decided to create individual elements for each package context as this solves the problem just a little more work on my behalf thanks for saving me spending any more time on this.