Book a Demo

Author Topic: Profile ID and FQ stereotypes  (Read 9700 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Profile ID and FQ stereotypes
« on: August 17, 2020, 10:26:14 pm »
Hi there!


When you publish a profile (not an MDG technology), the profile gets an ID, which is a nine-digit hex number with a hyphen thrown in before the last digit. This code is never shown in the GUI, but it is retained when you overwrite the same file.

A) What is it for?
B) Does it have any bearing at all on fully-qualified stereotypes?
C) Or on anything?
D) If you completely replace all contents of the profile, and even the name, and then save it with the same ID, what will happen when that profile gets used in a project where the old one had already been used?
E) If you change the ID of a profile that's in use, what will happen?

(The technology also has an ID, but that is set by the toolsmith, is shown in the technology creation wizard, and has specific, though poorly documented, uses. I'm talking about the profile ID here.)


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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Profile ID and FQ stereotypes
« Reply #1 on: August 17, 2020, 10:58:08 pm »
I don't know the answer, but my Sparx senses tell that

D) Reusing the ID in the same model could be problematic
E) Changing the ID of a profile in use could be problematic as well.

Better be safe than sorry right?

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Profile ID and FQ stereotypes
« Reply #2 on: August 17, 2020, 11:20:00 pm »
Well, it's Sparx stuff. When I have two versions of a MDG in a folder EA always loads both versions regardless of which tickmark I set in the MDG options. There's also a version number inside the MDG plus these IDs. It's just one of these messed up things.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Profile ID and FQ stereotypes
« Reply #3 on: August 18, 2020, 08:22:46 am »
Hi there!


When you publish a profile (not an MDG technology), the profile gets an ID, which is a nine-digit hex number with a hyphen thrown in before the last digit. This code is never shown in the GUI, but it is retained when you overwrite the same file.

A) What is it for?
B) Does it have any bearing at all on fully-qualified stereotypes?
C) Or on anything?
D) If you completely replace all contents of the profile, and even the name, and then save it with the same ID, what will happen when that profile gets used in a project where the old one had already been used?
E) If you change the ID of a profile that's in use, what will happen?

(The technology also has an ID, but that is set by the toolsmith, is shown in the technology creation wizard, and has specific, though poorly documented, uses. I'm talking about the profile ID here.)


/Uffe


It's the first 10 characters of the GUID of either the package or diagram that you exported the profile from. Its main use is to prevent two versions of the same profile being loaded.
« Last Edit: August 18, 2020, 09:12:21 am by KP »
The Sparx Team
[email protected]

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Profile ID and FQ stereotypes
« Reply #4 on: August 18, 2020, 04:19:40 pm »
It's the first 10 characters of the GUID of either the package or diagram that you exported the profile from. Its main use is to prevent two versions of the same profile being loaded.
Oooh that's nasty. So I get different IDs depending on whether I save the diagram or the package?

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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Profile ID and FQ stereotypes
« Reply #5 on: August 18, 2020, 04:36:25 pm »
It's the first 10 characters of the GUID of either the package or diagram that you exported the profile from. Its main use is to prevent two versions of the same profile being loaded.
Oooh that's nasty. So I get different IDs depending on whether I save the diagram or the package?

/U
I don't get it. Why is that nasty? In both cases it's the basis on which the UML profile has been generated.
Seems common sense to me.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Profile ID and FQ stereotypes
« Reply #6 on: August 18, 2020, 05:18:44 pm »
It's the first 10 characters of the GUID of either the package or diagram that you exported the profile from. Its main use is to prevent two versions of the same profile being loaded.
Oooh that's nasty. So I get different IDs depending on whether I save the diagram or the package?
I don't get it. Why is that nasty? In both cases it's the basis on which the UML profile has been generated.
Seems common sense to me.

Because if the main use is to prevent two versions of the same profile from being loaded, you can't have two different IDs for the same content (stereotype definitions).

The actual profile identifier in UML terms is the profile's name. That's what EA uses to distinguish two stereotypes with the same (base) name.

The profile name is set in the publish dialog. Package/diagram name is immaterial, and the file name isn't used.
So if I publish the same profile once from the package and once from the diagram, they get the same name but different IDs, thus allowing the same set of fully-qualified stereotypes to be loaded twice.

If the intent is to prevent conflicting definitions of the same (ie fully-qualified) stereotypes from being loaded, this mechanism doesn't cut it.


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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Profile ID and FQ stereotypes
« Reply #7 on: August 19, 2020, 08:07:21 am »
Because if the main use is to prevent two versions of the same profile from being loaded, you can't have two different IDs for the same content (stereotype definitions).
Maybe you should give that a try. Both the name and the id have to be unique.
[/quote]

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Profile ID and FQ stereotypes
« Reply #8 on: August 19, 2020, 04:44:18 pm »
Because if the main use is to prevent two versions of the same profile from being loaded, you can't have two different IDs for the same content (stereotype definitions).
Maybe you should give that a try. Both the name and the id have to be unique.

Nope.
  • Create a «profile» package "MyProfPkg" with a diagram "MyProfDiag".
  • Create a stereotype "MyStereotype".
  • Publish the package with the profile name "MyProfile" and the file name "MyProfPkg.xml".
  • Publish the diagram with the profile name "MyProfile" and the file name "MyProfDiag.xml".
  • Go to Resources.
  • Import "MyProfPkg.xml".
  • Import "MyProfDiag.xml". EA allows this, and lists MyProfile twice, each with its own MyStereotype.

The MDG technology wizard gladly accepts both files into the same technology, even though they both contain a profile with the same name (call this case A).

In fact, the MDG technology wizard even accepts duplicate files into the same technology, so the technology ends up containing two complete copies of a same-name, same-ID profile (case B).

Importing a technology created from either the (A) or the (B) case causes no warnings.

So you can import two profiles with the same names but different IDs.
You can generate a technology containing profiles with the same names but different IDs, and import the technology.
You can generate a technology containing profiles with the same names and same IDs, and import the technology.

Exactly which case does this duplicate-profile check actually work for?


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