Book a Demo

Author Topic: Script fragments loose connection to script when deployed in MDG  (Read 7638 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
I have created some RTF script fragments  and I wanted to deploy the lot via an MDG.
Unfortunately the script fragment looses the link to the script if deployed via an MDG.
The only solution was to import the script using Import Reference Data, breaking my whole nice MDG deployment scheme.

Digging a bit into the details I noticed that the template references the script by its GUID, but the script int he MDG doesn't have a GUID at all, so logically that doesn't work.

Reported as bug

Geert

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Script fragments loose connection to script when deployed in MDG
« Reply #1 on: June 22, 2016, 08:52:16 pm »
Hello Geert,
I posted a similar or maybe the same thing a while ago.
See:
http://sparxsystems.com/forums/smf/index.php/topic,30193.msg220679.html#msg220679

This issue was said to be fixed in V13 (did not verify that up to now).
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Script fragments loose connection to script when deployed in MDG
« Reply #2 on: June 22, 2016, 08:54:23 pm »
You are right indeed.
I did not even realize it was the same problem :-[

I'll try to test it in v13 one of these days.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Script fragments loose connection to script when deployed in MDG
« Reply #3 on: June 22, 2016, 09:06:17 pm »
You don't need to import the script as reference data in the target project.

The trick is to generate the MDG Technology twice. The first time is so that the script is included, the second time is for the template-to-script reference. So the second time, you need to have the MDG Technology selected in your MDG Technology development project.

You must also make sure that in the script selection drop-down, you select the script from the MDG Technology and not from the local project. The simplest way to achieve that is to temporarily rename the script in the project, make the selection in the template, then change the name back again.

Simple, no? :)

This only applies to the script itself, and you only need to do it once for each template-script reference. So once the reference is set up correctly, you can change the function call as needed without hassling through the same procedure.

I'm assuming this is because the template refers to the script by fully-qualified name (MDG Technology :: Script), not by GUID.

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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Script fragments loose connection to script when deployed in MDG
« Reply #4 on: June 22, 2016, 09:08:35 pm »
Ah, never even thought of that.
I'll try that.

Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Script fragments loose connection to script when deployed in MDG
« Reply #5 on: June 22, 2016, 09:25:16 pm »
YES!, the workaround suggested by Uffe works, thanks!

Geert

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Script fragments loose connection to script when deployed in MDG
« Reply #6 on: June 24, 2016, 07:53:44 am »
If I understand what you're saying Uffe - and I've only had one coffee - that may fix some of the issues I've had with alternate issues in sample models and patterns.

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Script fragments loose connection to script when deployed in MDG
« Reply #7 on: June 28, 2016, 11:29:14 pm »
Really strange workaround but it helped me as well!
Thank you Uffe!
Best regards,

Peter Heintz