Author Topic: Where are quicklinks of an MDG stored in the database?  (Read 2316 times)

adepreter

  • EA User
  • **
  • Posts: 128
  • Karma: +2/-2
    • View Profile
Where are quicklinks of an MDG stored in the database?
« on: May 28, 2018, 01:42:00 am »
Hello,
We would like to DYNAMICALLY update the quicklinks in our model repository where our MDG is stored (without changing the MDG).
Does anybody know where these quicklinks are stored?
Thanks,
Alain

Why do we want to do this?
The model validation features of our addin dynamically adapts to metamodel changes without having to change anything in opur MDG.
Our formal metamodel is used 1) for model validation 2) for quicklinks generation 3) for documentation
See an example here: http://www.labnaf.one/guidance/index.html?guid=5049F7C5-210B-43b3-82BB-C6315222113A

The only thing missing to make it entirely dynamic is to update the quicklinks in the repostory when the metamodel gets changed.

We do *NOT* want to use a metamodel defined in the MDG as this is not dynamic.



Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6857
  • Karma: +144/-104
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #1 on: May 28, 2018, 09:28:10 am »
Hi Alain,

Unfortunately, they're NOT stored in the DB!

We have a related issue.  We generate the Quicklinker entries from an Excel Spreadsheet (similar to the ArchiMate relationship matrix).  We have some automation to embed the new QuickLinker definitions into the MDG and then we unload/reload the MDG.

Works for us.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 308
  • Karma: +12/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Where are quicklinks of an MDG stored in the database?
« Reply #2 on: May 28, 2018, 11:45:22 am »
An MDG added in the DB is stored in the t_document table (ElementID = TECHNOLOGY)

I believe the contents are stored as zipbin, you must be able to write some code to replace the <QuickLink /> content, and update the MDG dynamically.

Not sure if this is what you are after.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6857
  • Karma: +144/-104
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #3 on: May 28, 2018, 01:07:43 pm »
An MDG added in the DB is stored in the t_document table (ElementID = TECHNOLOGY)

I believe the contents are stored as zipbin, you must be able to write some code to replace the <QuickLink /> content, and update the MDG dynamically.

Not sure if this is what you are after.
But it doesn't help Alain. I think you still have to unload/reload the MDG to re-read the entries.  We found it quicker, easier and more reliable to do it from the XML files.

Paolo

BTW: Our repository doesn't have any t_documents marked "TECHNOLOGY".
« Last Edit: May 28, 2018, 01:10:28 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 308
  • Karma: +12/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Where are quicklinks of an MDG stored in the database?
« Reply #4 on: May 28, 2018, 02:27:35 pm »
But it doesn't help Alain. I think you still have to unload/reload the MDG to re-read the entries.  We found it quicker, easier and more reliable to do it from the XML files.
Paolo

BTW: Our repository doesn't have any t_documents marked "TECHNOLOGY".

If i choose to import the MDG to the local Database , it writes it as an entry in the t_document table.
The unload / reload was a issue, when we used to add MDGs  by specifying the path in 'MDG Technologies - Advanced' window. however after we started adding it in the resource (to the repository) a restart of EA usually fixes the Quick linker.

May be i'm missing something.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6857
  • Karma: +144/-104
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #5 on: May 28, 2018, 02:49:06 pm »
But it doesn't help Alain. I think you still have to unload/reload the MDG to re-read the entries.  We found it quicker, easier and more reliable to do it from the XML files.
Paolo

BTW: Our repository doesn't have any t_documents marked "TECHNOLOGY".

If i choose to import the MDG to the local Database , it writes it as an entry in the t_document table.
The unload / reload was a issue, when we used to add MDGs  by specifying the path in 'MDG Technologies - Advanced' window. however after we started adding it in the resource (to the repository) a restart of EA usually fixes the Quick linker.

May be i'm missing something.
We're both missing something.  I'm not importing into the repository as a resource (I thought this was deprecated - may be wrong).  We find it faster to unload/reload than an exit of EA and restart.
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 308
  • Karma: +12/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Where are quicklinks of an MDG stored in the database?
« Reply #6 on: May 28, 2018, 02:53:08 pm »
Sorry, I meant 'Import to Model' or in Resources Window -> MDG Technologies.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2654
  • Karma: +41/-2
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #7 on: May 28, 2018, 03:11:00 pm »
I'm not importing into the repository as a resource (I thought this was deprecated - may be wrong).

The old version of importing to resources was deprecated. That used to break out all the parts of the technology and import them into their respective tables (e.g. profiles imported into the t_stereotypes table). The new version of importing to resources imports the whole technology file undigested, and then uses it as just another place to read technologies from at start-up. (I have no idea if what I just said makes sense)
The Sparx Team
support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6857
  • Karma: +144/-104
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #8 on: May 28, 2018, 04:35:50 pm »
I'm not importing into the repository as a resource (I thought this was deprecated - may be wrong).

The old version of importing to resources was deprecated. That used to break out all the parts of the technology and import them into their respective tables (e.g. profiles imported into the t_stereotypes table). The new version of importing to resources imports the whole technology file undigested and then uses it as just another place to read technologies from at start-up. (I have no idea if what I just said makes sense)
It does make sense, Neil,

But presumably, if we do that then EVERYBODY has to use the same version of the MDG at the same time yes?  We allow multiple versions of the MDG to be "Live" at the same time. Can that still be done under the imported scenario?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2654
  • Karma: +41/-2
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #9 on: May 28, 2018, 04:45:03 pm »
I'm not importing into the repository as a resource (I thought this was deprecated - may be wrong).

The old version of importing to resources was deprecated. That used to break out all the parts of the technology and import them into their respective tables (e.g. profiles imported into the t_stereotypes table). The new version of importing to resources imports the whole technology file undigested and then uses it as just another place to read technologies from at start-up. (I have no idea if what I just said makes sense)
It does make sense, Neil,

But presumably, if we do that then EVERYBODY has to use the same version of the MDG at the same time yes?  We allow multiple versions of the MDG to be "Live" at the same time. Can that still be done under the imported scenario?

Paolo

Presumably you do that by having some of your people using the technology at one location and the rest using the technology at a different location? Unfortunately, for imported technologies I don't think you can switch off the internal location, so yes that's the version that everybody will get.
The Sparx Team
support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6857
  • Karma: +144/-104
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #10 on: May 28, 2018, 05:15:09 pm »
Presumably, you do that by having some of your people using the technology at one location and the rest using the technology at a different location? Unfortunately, for imported technologies I don't think you can switch off the internal location, so yes that's the version that everybody will get.
Yes, although by location I mean different URLs.  I "improve" the MDG on my local hard drive.  Power users get the stable development as UAT at one URL.  The masses get the "approved" version at a third URL.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

adepreter

  • EA User
  • **
  • Posts: 128
  • Karma: +2/-2
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #11 on: May 29, 2018, 05:34:20 pm »
I didn't know I would start such passionate discussion :-)

How can we wrap/unwrap the zipbin MDG content (to/from the t_document table)?

A.

qwerty

  • EA Guru
  • *****
  • Posts: 10600
  • Karma: +232/-194
  • I'm no guru at all
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #12 on: May 29, 2018, 05:49:36 pm »
Binary data are (usually) a zip with a single file encoded with base64.

q.

adepreter

  • EA User
  • **
  • Posts: 128
  • Karma: +2/-2
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #13 on: May 30, 2018, 01:05:03 am »
Thank you very much to all.
It works :-)

pieter.steyn

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Where are quicklinks of an MDG stored in the database?
« Reply #14 on: June 27, 2018, 12:47:08 pm »
I have been looking at the ArchiMate3.xml that ships with EA v14.

It contains no QuickLink node, but instead has stereotypedrelationship definitions for the ArchiMate elements that were not in the v13.5 MDG XML:
It also has a "_HideUmlLinks" property, which seems to directly relate to QuickLinks.

Is this now how QuickLinks are defined?
I can't find anything in the documentation.

<Stereotype name="ArchiMate_BusinessActor" metatype="BusinessActor" ...  strictness="profile">
            <stereotypedrelationships>
              <stereotypedrelationship stereotype="ArchiMate3::ArchiMate_Assignment" constraint="ArchiMate3::ArchiMate_BusinessRole;ArchiMate3::ArchiMate_Stakeholder;ArchiMate3::Business Behavior"/>
            </stereotypedrelationships>
...
            <AppliesTo>
              <Apply type="Class">
                <Property name="_defaultDiagramType" value="ArchiMate3::Business"/>
                <Property name="_HideUmlLinks" value="True"/>
              </Apply>
            </AppliesTo>
          </Stereotype>