Book a Demo

Author Topic: Adding Model Templates to A MTS file  (Read 7070 times)

Rossco

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Adding Model Templates to A MTS file
« on: April 21, 2008, 08:01:18 am »
The instructions are as follows

Open your MTS file in a text editor and copy and paste the following <ModelTemplates> block at the top level inside the <MDG.Technology> block:

<ModelTemplates>

  <Model name="Template Name"

         description="This is the description."

         location="MyTemplatePackage.xml"

         default="yes"

         icon = "34"

         filter= "Filter Name"/>

</ModelTemplates>

You can include as many <ModelTemplates> blocks as you have model templates. The attributes have the following meanings:

There is no <MDG.Technology> block: in the MTS and when I Add the Model Template into the MTS file it dosen't work,

Any Ideas?

Regards

Ross

brannstrom

  • EA User
  • **
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #1 on: April 21, 2008, 08:24:53 pm »
The <MDG.Technology> block exists in the technology xml file. I would test to paste it into the xml file and see if that works.

/N

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #2 on: April 21, 2008, 10:41:20 pm »
It looks like Rossco has spotted a documentation bug here.

My guess is that these need to go into the MTS file, and some of the options control the dialogs that come up during the generation of the XML file. [I could be wrong here.]

Try running the MTS creation process, and explicitly checking the option to include templates. See if the section is created. If it is not, try creating the section on your own, first as an additional top-level element - yes, I know it won't be well-formed - and if that does not work, within the top-level element that's already there.

Also, send a bug report in to Sparx. You'll find the link near the bottom of any forum page.

David
No, you can't have it!

brannstrom

  • EA User
  • **
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #3 on: April 22, 2008, 12:13:57 am »
I have now added a model template. I added the template in the mts file in the same way you do with Toolboxes or Modelsearches.

I added the <ModelTemplates> tag to the mts file just before the </MDG.Selections> line. And it worked!

/N


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #4 on: April 22, 2008, 12:52:40 am »
Did you send in a bug report concerning the documentation?
No, you can't have it!

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #5 on: April 22, 2008, 10:17:55 am »
Thanks for highlighting this error. I have corrected the text in the Incorporate Model Templates topic and the Define Model Validation Configuration topic. Where it refers to the MDG.Technology block it should read MDG.Selections.

The correction should be incorporated in the Help for the next release.
Best Regards, Roy

Rossco

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #6 on: April 28, 2008, 07:58:59 am »
Have done that and the diagrams and tollboxs all work fine but The Technology/template is not showing when using the Add wizard to create a new model.

Is there anything special that you need to do. I have exported the model to XML and added the reference in the MTS file.

Regards and thanks for the feedback

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #7 on: April 28, 2008, 10:07:50 am »
The Wizard only handles certain inclusions, as listed on the dialog at Step 4 of the Create MDG Technologies procedure. You add Model Templates separately, to the MTS file as described in the Incorporate Model Templates in a Technology procedure.

The two procedures are at:

http://www.sparxsystems.com.au/EAUserGuide/index.html?creatingmdgtechnologies.htm

and

http://www.sparxsystems.com.au/EAUserGuide/index.html?model_templates2.htm
Best Regards, Roy

Rossco

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #8 on: April 28, 2008, 10:47:46 am »
Hi Roy,

Here is the MTS file contents - I have followed the instructions in the help file. As I said the profiles and Diagrams work fine but not the Model Template. IS it the format of the bolded section or another issue that would cause the problem

Regards
Rossco

<MDG.Selections model="G:\Business Analysis\Analysts\EA\EA Implementation\Implementation\Implementation Model\Implementation Model.EAP">
      <Technology id="1002" name="LTNZ" version="1.14" notes="This MDG technology includes the custom UML Profile tookboxs and diagrams for modeling within LTNZ" filename="G:\Business Analysis\Analysts\EA\EA Implementation\Model Templates\Reference Data\MDG Packages\LTNZ.xml"/>
      <Profiles directory="G:\Business Analysis\Analysts\EA\EA Implementation\Model Templates\Reference Data\UML Profiles" files="Domain Model.xml,Model Documentation.xml"/>
      <TagVals tags="Datafield,Feild Requirement,Role,Software"/>
      <Images images=""/>
      <CodeMods/>
      <Transforms/>
      <DiagramProfile directory="G:\Business Analysis\Analysts\EA\EA Implementation\Model Templates\Reference Data\UML Profiles" files="Diagrams.xml"/>
     <ModelTemplates>
            <Model name="LTNZ Business Analysis Model" description="This is the description." location="G:\Business Analysis\Analysts\EA\EA Implementation\Model Templates\Reference Data\UML Profiles\BSA.xml" default="no" icon="34" filter=""/>
      </ModelTemplates>

</MDG.Selections>

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #9 on: April 28, 2008, 02:19:07 pm »
Hi Rossco,

What is the file BSA.xml that you are referencing? It needs to be an XMI export - I don't remember off the top of my head which XMI version, but it needs to allow full EA round-tripping. It might be worth trying both XMI 1.1 and XMI 2.1 to see if it makes a difference.

EDIT: Also try a relative path rather than a full path. Not everyone that uses your technology is guaranteed to have a G: drive with your XMI on it...
« Last Edit: April 28, 2008, 02:21:31 pm by KP »
The Sparx Team
[email protected]

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #10 on: April 28, 2008, 02:30:07 pm »
Sorry, I misunderstood your earlier email, Rossco. You were, I now understand, referring to the second pass through the Wizard.

I hope Neil has solved your problem. He knows considerably more about it than I do!
Best Regards, Roy

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Adding Model Templates to A MTS file
« Reply #11 on: April 29, 2008, 09:13:00 am »
And I understand that Neil and Rossco have resolved the problem.  For clarity, we have amended the Help concerning the location parameter in the model templates package (see the Incorporate Model Templates in a Technology topic).

The text now reads:

location: Contains the path of the XML file that contains the XMI export of the model template package, relative to the location of the MDG Technology file. If the XMI file is in the same folder as the technology file then this just contains the file name.
Best Regards, Roy