Book a Demo

Author Topic: Locate Archimate profile in DB using SQL  (Read 10813 times)

Fefceac

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Locate Archimate profile in DB using SQL
« on: January 14, 2022, 12:07:33 am »
Hi guys,

Can you tell me where in the DB is stored the archimate profile of a business actor ? I've searched t_object and t_objectproperties and did not found it. I have some Archimate 2 business actors and some Archimate 3 and I need to find them all without searching all the folders in the GUI. Also I did not found related posts on the forum.

Thank you.

Fefceac

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #1 on: January 14, 2022, 12:45:04 am »
Update, I've found the info in t_xref, should I look for it in more places?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #2 on: January 14, 2022, 02:30:52 am »
The profile itself is not stored in t_xref, just the stereotype information from the profile (it's FQN).

The profile is either in the search path for the MDG, your %appdata% for EA, in EA's prorgram folder (internal and MDG) or imported in the model where it's in t_document.

q.

Fefceac

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #3 on: January 14, 2022, 05:25:10 am »
The profile itself is not stored in t_xref, just the stereotype information from the profile (it's FQN).

The profile is either in the search path for the MDG, your %appdata% for EA, in EA's prorgram folder (internal and MDG) or imported in the model where it's in t_document.

q.

Hi, you got me confused, maybe I did not used the proper naming with profile. If I use the GUI and check an object properties I have a stereotype field with an option menu, for a Archimate business actor in the profile field I can se Archimate 2 or 3 based on the Archimate version under which it was created. Now in t_xref I found where the stereotype ie stored, but I suspect it is not the only place, since I chose to alter the version in the DB from 2 to 3 or 3 tot 2 the object profile is not change but EA is interpreting it as Class oject without profile. From what I found on the forum so far a "Profile Metatype" exist but I did not figure it out where is stored.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #4 on: January 14, 2022, 06:41:07 am »
Well, a profile is a set of stereotypes. Bascially. A MDG bundles a couple of profiles. Basically. An element has a stereotype, which is derived from a profile. (Or a wild one allowed by EA which's profile name is <none>.)

Now, the FQN for an element's stereotype is found in t_xref, along with the not qualified stereotype name. This unqualified name is also found in t_object.stereotype (or Element.Stereotype in the API object). Both must be in synch. If not you will have trouble. I'd guess that the consistency check will fix that, but I'd not bet on it.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Locate Archimate profile in DB using SQL
« Reply #5 on: January 14, 2022, 06:42:38 am »
The actual profile (containing all the stereotype of that profile) is stored in the MDG, but that is not what you need.

What you are looking for is where the stereotype (fully qualifed with a profile) is stored.
That is in fact in t_xref.

There is a script that will update your ArchiMate2 to ArchiMate3 for you. It's standard included in the MDG

Geert

Fefceac

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #6 on: January 14, 2022, 08:37:28 am »

There is a script that will update your ArchiMate2 to ArchiMate3 for you. It's standard included in the MDG



Yes, the script works to migrate ArchiMate 2 to 3, I was trying to roll back the business actors from a package which was migrated from 2 to 3 and should not have been.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #7 on: January 14, 2022, 08:56:13 am »
I was trying to roll back the business actors from a package which was migrated from 2 to 3 and should not have been.

Perhaps the easiest way would be to export to XMI, open in a text editor, find and replace 'ArchiMate3', then re-import. It's not a universal solution - sometimes it's more than the stereotype that changes between technology versions - but for ArchiMate business actors it will be enough.
The Sparx Team
[email protected]

Fefceac

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #8 on: January 14, 2022, 09:13:46 am »
I was trying to roll back the business actors from a package which was migrated from 2 to 3 and should not have been.

Perhaps the easiest way would be to export to XMI, open in a text editor, find and replace 'ArchiMate3', then re-import. It's not a universal solution - sometimes it's more than the stereotype that changes between technology versions - but for ArchiMate business actors it will be enough.

I have an XMI export done before the migration. I use the business actors  as classifiers and their instances are associated to some business processes. My fear is that if I delete the folder and import the XMI the classifier links will be corrupted. At this point I estimate that using the Cinderella method and changing each actor properties by hand in GUI is safer than importing and creating more errors. If this fails I can use the XMI back-up I've done for each package or maybe renounce all pride and go to DB admin and ask to roll back the DB to yesterday.

UPDATE, I've reimported a small number of elements, although I've preserved the GUID the links between classifier and instances  does not work properly, if I try to locate the actor in all diagrams it does not work but the instances retain the link, it works if i use Locate classifier in PB on the instance, I suspect is due to the object having a new object_id even if the GUID did not change. As I see it i can reload al actors, and using sql I can match them to the instances using the field classifier_guid and the update the fiel classifier with de new actors object ID. It may work.
« Last Edit: January 14, 2022, 09:57:22 am by Fefceac »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #9 on: January 14, 2022, 11:17:16 am »
My fear is that if I delete the folder and import the XMI the classifier links will be corrupted.

Don't delete anything. Just export, edit, import.
The Sparx Team
[email protected]

Fefceac

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Locate Archimate profile in DB using SQL
« Reply #10 on: January 14, 2022, 07:27:34 pm »
My fear is that if I delete the folder and import the XMI the classifier links will be corrupted.

Don't delete anything. Just export, edit, import.

Yes, I did it on a test package, it alters the object and is not seen as ArchMate 2 Business Actor but as a Class object. As I see in the xml, just search and replace may not do the trick, some paths must be adapted for ArchiMate 2. I've corrected them by hand using the GUI last night, I will keep this in the back of my mind and if I find the fix I'll update here.