Book a Demo

Author Topic: Archimate2 Metatypes and SQL  (Read 6635 times)

Ian Mitchell

  • EA User
  • **
  • Posts: 507
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Archimate2 Metatypes and SQL
« on: March 24, 2016, 07:45:00 pm »
My customer is using Archimate2, and has a large model, developed over many EA releases.
They are now seeing some pain from how Archimate_Location elements are stored, as their model has saved them in two ways, and we don't know why.
Looking in the database, some Archimate_Location elements have Object_type="Class", some have Object_type="Location".
Has something changed across EA releases? This seems possible because when opening the properties of a 'Class' style element, then closing it (without changing any data), it got saved back in the database with object_type='Location', and a new 'modified date'.
This would normally not be a problem, because the UI makes everything look OK, but our model-quality analyser is flagging errors because we have the same 'thing' stored in two ways.
Has anyone seen this before?
Also, when I run a query to find these things in a test repository with a few brand-new Archimate_Location instances, the SQL seems to vary the results I get: for some queries, the object_type='Class' , for others object_type='location'. Sometimes both IN THE SAME QUERY. The Object_Type just seems to randomly say 'Class' or 'Location'.
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Archimate2 Metatypes and SQL
« Reply #1 on: March 24, 2016, 08:33:40 pm »
In the past I've some inconsistencies like this. The reason was that more than one stereotype selected on the element for some reason. Think the cause was someone created a location with another archimate type like node then tried to change it by dragging the location from the tool box onto the element in the diagram. The result was it had archimate_node and archimate_location selected. You can open the stereotype in the element and uncheck the stereotype not required. I've also seen people try changing element's stereotype by checking another but not unchecking the original resulting in two stereotypes.
You can fix it by running a script and setting just one stereotype or doing it manually via the user interface.
« Last Edit: March 25, 2016, 07:23:02 am by Sunshine »
Happy to help
:)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Archimate2 Metatypes and SQL
« Reply #2 on: March 25, 2016, 04:56:07 am »
I've never seen it, but I think "Location" is not a valid object_type.

Geert

Ian Mitchell

  • EA User
  • **
  • Posts: 507
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Re: Archimate2 Metatypes and SQL
« Reply #3 on: March 25, 2016, 05:01:21 am »
...which is exactly why I was surprised to see it in t_object.object_type!
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Archimate2 Metatypes and SQL
« Reply #4 on: March 29, 2016, 09:29:23 am »
Are you looking at the database or running a custom sql search?

The custom sql search has 'smarts' that try to display a stereotype custom metatype. If I want the base object type I use something like select Object_Type as Real_Object_Type ...

The Object_Type field should never contain 'Location'.