Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Uffe on August 17, 2020, 10:26:14 pm

Title: Profile ID and FQ stereotypes
Post by: Uffe 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
Title: Re: Profile ID and FQ stereotypes
Post by: Geert Bellekens 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
Title: Re: Profile ID and FQ stereotypes
Post by: qwerty 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.
Title: Re: Profile ID and FQ stereotypes
Post by: KP 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.
Title: Re: Profile ID and FQ stereotypes
Post by: Uffe 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
Title: Re: Profile ID and FQ stereotypes
Post by: Geert Bellekens 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
Title: Re: Profile ID and FQ stereotypes
Post by: Uffe 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
Title: Re: Profile ID and FQ stereotypes
Post by: Eve 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]
Title: Re: Profile ID and FQ stereotypes
Post by: Uffe 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.

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