Book a Demo

Author Topic: What changed from 13.5 to 14.1 regarding custom profiles  (Read 5132 times)

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
What changed from 13.5 to 14.1 regarding custom profiles
« on: November 28, 2018, 05:15:08 am »
I used to change a profile - up to EA 13.5 -, e.g. add a stereotype or change the skin of a stereotype, export it as a profile to an xml file, import it to my model. It overrides the older one. Sync makes sure all changes applied to stereotyped elements.
When I do the same in EA14.1, I got a second profile under Resources/UML Profils. It does not override the existing one.
I found in the xml of the profile a cryptic Documentation id. When I - manually in the xml - change it to the id of the old profile that got from the EA 13.5 maintained one, it works as expected: at import the existing one is overriden.

Question: how can I get the old doc id exported from 14.1?
Or: how can I tell all my stereotyped elements in my model to adhere to a profile with a new doc id, given that the name of the profile and the names of the stereotypes have not changed?

Would appreciate your help.
Rolf

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: What changed from 13.5 to 14.1 regarding custom profiles
« Reply #1 on: November 28, 2018, 09:17:54 am »
What changed is that you have a single ribbon menu item that will select either the diagram or package to export. Whichever one is being exported isn't the same as the way you were doing it in 13.5.

Solution:
Select the package in the project browser immediately before running the export.
If that doesn't work, click in the diagram immediately before running the export.

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: What changed from 13.5 to 14.1 regarding custom profiles
« Reply #2 on: November 29, 2018, 03:04:09 am »
Thank you Simon.
When I am exporting the diagram as a profile I can import it and it works.
However, it does not overload the profile that I have used so far, because it generates a different value for the Documentation/@id attribute.

Not overloading is a problem, because I can not apply changes to existing stereotyped elements. The newly imported profile has obviously no relation to the stereotyped elements that were stereotype with a profile with a different Documentation/@id.

Is there a solution, so that the changed an imported profile stereotypes can be synced with existing ones by name - regardless what Documentation/@id value, or how to change the Documentation/@id to the desired value on profile export?
Rolf

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: What changed from 13.5 to 14.1 regarding custom profiles
« Reply #3 on: November 29, 2018, 09:39:08 am »
When I am exporting the diagram as a profile I can import it and it works.
However, it does not overload the profile that I have used so far, because it generates a different value for the Documentation/@id attribute.
Then it's probably an export of that package that you have previously used.

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: What changed from 13.5 to 14.1 regarding custom profiles
« Reply #4 on: December 06, 2018, 03:20:03 am »
Let me repeat in other words:
I have a model that uses a profile for stereotypes.
I maintain that profile in a separate model, there I have a package with a diagram holding my stereotypes.
I am used to the following:
After maintanance I export the profile as a profile.xml.
In the using model, I import the profile. EA informs me that a profile of this name exists, and get asked whether I want to overload it.

But now it is different: I am not asked. The maintained profile is just imported by the same name. I get two profiles with the same name and allmost identical stereotypes. Problem is, even though the stereotypes have the same name, they seem to be different, as changes I did to the newer one get not synced to elements using that stereotype name, but from the older profile.

The reason I found lies in the Document/@ID, an element/attribut found in the exported profile.xml. If I change it manually in the newly exported profile.xml to hold the same value as the former exported one, EA overloads it on import as desired.

How can I tell EA what Document/@ID value to use at export to profile.xml?

Rolf

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: What changed from 13.5 to 14.1 regarding custom profiles
« Reply #5 on: December 10, 2018, 09:24:46 am »
How can I tell EA what Document/@ID value to use at export to profile.xml?

When you save a package as a UML Profile, the ID is derived from the first 10 characters of the package's GUID. When you save a diagram as a UML Profile, the ID is derived from the first 10 characters of the diagram's GUID. This is why Simon was explaining that it matters whether you have the profile diagram or the profile package selected when you use the "Import UML Profile" command.
The Sparx Team
[email protected]

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: What changed from 13.5 to 14.1 regarding custom profiles
« Reply #6 on: December 11, 2018, 07:59:51 pm »
Ok, thank you KP for your help.
But again, the problem is, that I get two different Document/@ID when I export the very same profile package with 13.5 or 14.1 as a profile.xml.
Which means, I cannot maintain a profile with 14.1 that I initially created with 13.5.
If I do I will get a different Document/@ID with the very same profile package hindering to overload the profile in models where the 13.5 generated one is used.

adding some observations:
1.
I can find the 13.5 profiles Document/@ID in the XMI export of the profile package, as you said. But I cannot find the 14.1 Document/@ID. Seems 14.1 hashing something on profile export, not just copying.
2.
In my case exporting with 14.1 by diagram or by package not only leads to the same Document/@ID but also to exactly the same profile.xml.
But still, with 14.1 I cannot find where this Document/@ID is derived from or how it is calculated.
« Last Edit: December 11, 2018, 09:12:48 pm by ngong »
Rolf