Book a Demo

Author Topic: Order of constructs in XMI 1.1  (Read 4920 times)

aloeffen

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Order of constructs in XMI 1.1
« on: August 20, 2018, 04:04:41 am »
Dear EA people,

does anyone know how EA determines the order of constructs in the project browser, e.g. classes within a package? If you move classes about within the package (using up-down arrows) a tagged value "tpos" is set. But if you don't, all constructs have a tpos of 0 (the default).
I read in "Topic: Re-ordering/ Preserving Connection Order" that this is probably an order by ID (!). True?
In that case I can copy that order in derived products (schema's, catalogues etc.) based on ID when tpos is 0, and tpos otherwise...

Thanks in advance.

Arjan

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Order of constructs in XMI 1.1
« Reply #1 on: August 20, 2018, 04:16:21 am »
Know that this is black magic. EA has a couple of rules how things are arranged (like Packages first). There's also a sort alphabetic option which has some influence. There are a number of elements (like Notes) that do not appear in the browser at all. And I'm pretty sure that the ordering does not follow the same rules throughout different EA versions.

I once summarized what I found out but it's buried somewhere in this what's being called a forum.

q.
« Last Edit: August 22, 2018, 05:24:23 pm by qwerty »

aloeffen

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Order of constructs in XMI 1.1
« Reply #2 on: August 22, 2018, 05:04:32 pm »
Thanks for your observations. This is unsettling.
We read the XMI 1.1 directly to process the class model.

I would assume that roundtrips are stable, i.e. read/write of the XMI would always ensure the same order. As I think this is the case (never found out otherwise) there MUST be a describable way that constructs are ordered. Sparx must be able to specify. I could not find that out, however.

Also, I would assume a project can be passed on to a newer version of EA without reordering the project. If this is not the case, this may be a reason for users to stick to an older version. Not a great business approach.
 
I admit that some constructs are not in the project browser (which is to some extent a flaw in the EA design, historical reasons I presume): e.g. associations and notes are not parts of the project browser. For associations we had to introduce tagged values to supply a "relative position".

Arjan