Book a Demo

Author Topic: MDG Technologies overwrite local scripts  (Read 7917 times)

Benno Dielmann

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-1
    • View Profile
MDG Technologies overwrite local scripts
« on: May 31, 2018, 01:56:14 am »
Has anyone done script development for inclusion of the scripts in MDG Technologies with EA14? I've encountered a bug that renders this almost impossible...

It seems that, if you write a script, then include it in an MDG Technology and finally load the Technology into the project, your local copy of the script gets overwritten by the version from the Technology each time you load the project. Thus, you loose any changes you made to the script and didn't export into the Technology...

To replicate,

  • Create a new project
  • In the Scripting window, create a new Normal Group "test"
  • In this group, create a new script "mytest" (script type seems to be irrelevant, I tested Javascript and VBScript with identical results)
  • Now generate an MDG Technology "testMDG" (I created the testMDG.xml in the folder where my .eapx file was located; gave other settings ID: testMDG; Version: 1; Notes: testMDG)
  • In the MDG Technology Wizard, remove the checkmark at Profiles and check Scripts
  • Then choose to include "mytest" from the scripts
  • Import the generated testMDG.xml into the model
  • A group "testMDG" appears in the Scripting window. The group is empty (expected behavior: the group should contain the script "mytest")
  • Now open "mytest" from the local group created in step 2
  • Make any change in the script's code
  • Save the script
  • Close the script editor and reopen the script. The changes are still there, as expected.
  • Close the project and reopen it
  • Open "mytest" as in step 9. The changes from step 10 are gone. Expected behavior: changes should be there.

Seems like a bug to me, probably caused by the scripts from the MDG Technology retaining some internal ID.

If you delete the script ("mytest" from group "test" created in step 2), close and reopen the project, the script now correctly appears under the group testMDG from the Technology.

Has anyone experienced this?

Best wishes,
Benno

Tested with EA14, Build 1421
All models are wrong. Some are useful. - George E. P. Box

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: MDG Technologies overwrite local scripts
« Reply #1 on: May 31, 2018, 02:48:21 am »
Hi Benno,

Has anyone experienced this?

Not that precisely, and I haven't tried generating an MDG Technology in 14, but I can tell you that

Quote
  8. A group "testMDG" appears in the Scripting window. The group is empty (expected behavior: the group should contain the script "mytest")
is an incorrect assumption. Script groups in an MDG Technology project are flattened into a single group with the MDG Technology's name. This is why you can't include project browser or diagram scripts in an MDG Technology.

I think it's your importing of an MDG Technology into the project where you develop it that's tripping you (or EA) up. I always do my testing in a different project, separate from my MDG Technology development project.

If my MDG Technology will include scripts, I create a single group for them which I name after the MDG Technology's ID -- not its name. This is to deal with situations where you have to make references to the MDG Technology from within the development project, such as when specifying a script to be called from a "Script" document template fragment.

HTH,


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

Benno Dielmann

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-1
    • View Profile
Re: MDG Technologies overwrite local scripts
« Reply #2 on: June 04, 2018, 07:58:11 pm »

Quote
  8. A group "testMDG" appears in the Scripting window. The group is empty (expected behavior: the group should contain the script "mytest")
is an incorrect assumption.

...or maybe I just didn't express myself clearly...

Quote
Script groups in an MDG Technology project are flattened into a single group with the MDG Technology's name.

...because that's exactly what I meant. There is a group with my MDG Technology's name ("testMDG") which should contain all the scripts of the Technology (in this case, the script "mytest"). Except it doesn't.

Quote
I think it's your importing of an MDG Technology into the project where you develop it that's tripping you (or EA) up.

The problem occurs if I load the Technology by other means as well, for example by specifying a path to load it from in the MDG Technologies Dialog (Advanced -> Add Path...). It's not specifically related to importing a Technology into the model.

Quote
I always do my testing in a different project, separate from my MDG Technology development project.

I do that as well, but for some quick testing it's convenient to be able to do that in one single project instead of having to switch all the time.

I still consider this to be a bug and do hope to get the attention from some Sparx staff here as well...
All models are wrong. Some are useful. - George E. P. Box

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Technologies overwrite local scripts
« Reply #3 on: June 04, 2018, 11:57:12 pm »
I still consider this to be a bug and do hope to get the attention from some Sparx staff here as well...

Benno,

Posting here will only inform the other users.
Sparx staff may see this, but they can't really act upon it as posting on the forum is not considered as a "real" bug report.

To officially log a bug report please use this link

Geert

Benno Dielmann

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-1
    • View Profile
Re: MDG Technologies overwrite local scripts
« Reply #4 on: June 05, 2018, 09:18:58 pm »
I still consider this to be a bug and do hope to get the attention from some Sparx staff here as well...

Benno,

Posting here will only inform the other users.
Sparx staff may see this, but they can't really act upon it as posting on the forum is not considered as a "real" bug report.

To officially log a bug report please use this link

Geert

I know, I know, Geert...

But any bug reports I have posted there up to now triggered not more than some automatic standard-reply email. And recently I helped identify and replicate a problem here in the Bugs and Issues Forum which subsequently was very quickly fixed by Sparx... (see http://www.sparxsystems.com/forums/smf/index.php/topic,39716.msg244740.html)

This is giving me the impression that forum posts here may raise more attention than "official" bug reports... Also, it gives the opportunity to discuss if it really is a bug and to collect opinions from other people. This is probably worth something to the Sparx guys when determining the urgency of a bug fix.

So I guess it might be a good strategy to discuss a bug here first and then, if necessary, submit it to the official bug tracker.

Which I'm going to do did right now  8)

Benno
« Last Edit: June 05, 2018, 09:39:36 pm by Benno Dielmann »
All models are wrong. Some are useful. - George E. P. Box

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Technologies overwrite local scripts
« Reply #5 on: June 05, 2018, 09:54:35 pm »
Hi Benno,

I think your observation was a bit skewed as you were discussing a high profile bug in a very new version.

I usually post both on the same time.
Posting on the forum might help other users who have the same problem, and sometimes you get a workaround that way as well.
I don't think it will make much difference to the way the Sparxians deal with it.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: MDG Technologies overwrite local scripts
« Reply #6 on: June 06, 2018, 09:29:49 am »
As Geert says, I can't generally act on something without a bug report.

The referenced thread existed both as an official bug report, and the forum thread. From memory it was only one of each, so not "high profile". Even so, the thread received the attention it did because of the bug report. Not the other way around.

PS. Even when we worked out exactly what caused the issue (which was not sorting on package id) I was still not able to reproduce that issue.