Book a Demo

Author Topic: Re-ordering/ Preserving Connection Order  (Read 6272 times)

William McKenzie

  • EA User
  • **
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re-ordering/ Preserving Connection Order
« on: February 26, 2016, 09:47:56 am »
Has anyone found a way to re-order connectors (or more precisely connector ends), like you can with attributes? This is quite critical for things like XML Schema definition where a change in order is breaking change.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Re-ordering/ Preserving Connection Order
« Reply #1 on: February 26, 2016, 10:08:03 am »
There is nothing out of the box. And honestly there is also not really anything definite. I guess (!) the connectors are ordered by their ID (which is incremented along with creating new connectors) and that might be the order for export. So what you might try (first manually): create a couple of (named) connectors and see if they are exported in the creation order. If so, you can write a script to memorize connectors, delete them and re-create them in the order you need them. This will have side effects: a) linked notes loose the link, b) bent connectors (or somehow treated in diagrams like hidden, colored or whatever) will loose this information. I guess that swapping the connector IDs will not make it much easier.

What I did in the past was writing my own im-/export which was able to respect a couple of rules. This way you can implement something to order the connectors in a way you want it (naming convention, tagged value, ...).

q.

William McKenzie

  • EA User
  • **
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: Re-ordering/ Preserving Connection Order
« Reply #2 on: February 26, 2016, 11:55:32 pm »
Thanks qwerty, that's more or less where we had landed after looking at the database. It sure would be nice if you could have an option to automatically display derived associations (i.e. if an attribute has a Type of a class that is on the diagram, then draw a line as if the association existed). Then we could make them attributes, order them any way we wanted and still see the relationships visually.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Re-ordering/ Preserving Connection Order
« Reply #3 on: February 27, 2016, 12:31:34 am »
I know one place where they have implemented their own xsd/wsdl generation.
There we opted for a tagged value on the associations to order them.

The tagged value is read by the xsd generator to decide in which order to put the associations.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Re-ordering/ Preserving Connection Order
« Reply #4 on: February 27, 2016, 01:09:59 am »
Using attributes additional to relations is probably not a very good idea (Geert has some blog about that). Having your own XSD im-/export is in my POV the way to go. It's nothing you do in the afternoon, but a prototype should be ready that time. The increased flexibility is something you won't miss.

q.