Book a Demo

Author Topic: Place scripts in correct script group after importing MDG  (Read 3386 times)

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Place scripts in correct script group after importing MDG
« on: March 11, 2020, 01:25:39 am »
I created an MDG with some scripts (Project Browser Group, Diagram Group).
But when I imported that MDG to a test repository, I noticed that all the scripts are imported in the same folder (technology name).

Is there a way to make sure the scripts are in the right folders (Project Browser Group, Diagram Group)?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Place scripts in correct script group after importing MDG
« Reply #1 on: March 11, 2020, 04:06:44 am »
You can't.
I always use refdata export/import for scripts, never MDG.

You can use this tool https://github.com/GeertBellekens/EARefDataSplitter to select scripts in a refdata file.

Geert

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Place scripts in correct script group after importing MDG
« Reply #2 on: March 11, 2020, 05:20:44 pm »
You can't.
I always use refdata export/import for scripts, never MDG.

You can use this tool https://github.com/GeertBellekens/EARefDataSplitter to select scripts in a refdata file.

Geert

I wanted to say, with a refdata export you cannot select which scripts should be included. Thanks for the tool, I'll try it.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Place scripts in correct script group after importing MDG
« Reply #3 on: March 11, 2020, 06:43:29 pm »
Hi Matthias,


The fact that script groups don't survive MDG Technology packaging is a known limitation. With "normal" groups it's an annoyance, with browser/diagram groups it's a serious lack of functionality.

I take a slightly different approach from Geert and implement the meat of my scripts in "library" scripts which I package into MDG Technologies, then reference from minimal browser/diagram scripts which I distribute as reference data.

The advantage of this approach is that scripts which know about MDG Technology content -- profiles, stereotypes, searches, templates -- can be packaged with that content, and only the dumb browser/diagram scripts need be separate. This way you also don't need to update any reference data when you make changes to the actual functionality scripts, only when you want to add or remove browser/diagram scripts.

Since technically a script group is itself a script, and since the group type (browser, diagram, etc) is included in the exported data, you can actually recreate the group structure from your source (MDG development) project in your target project(s) using reference data.

The only issue there is that the reference data export does not allow you to select individual scripts, but any decent editor will let you fix that and the XML structure is easy to understand just by looking at it. Or use Geert's selective script export utility.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.