Book a Demo

Author Topic: MDG Model Pattern  (Read 5629 times)

Danor

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
MDG Model Pattern
« on: April 17, 2013, 09:54:42 pm »
Hello,

I've created my own MDG Technology with stereotyps, profiles, ...
Now there is the function "New Model from Pattern", where i. e. you can create a Use Case Model. (Basic UML 2 Technology > Use Case). And it creates a new Package containing subpackages with elements and diagrams.
Now what I want is exactly that I define a so called "Model Pattern". I found the function "Diagram > Adavanced > Create UML Pattern ... " but this only allows me a diagram. How can I achieve to export the structue of Packages and their content to a pattern ?

Thanks for help :)

Konrad Wieland

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: MDG Model Pattern
« Reply #1 on: April 17, 2013, 10:55:35 pm »
Yes, you can do this. You create your model in the traditional way and export it as XML file. Now, you have to reference this pattern inside your MTS file, which you get when generating an MDG Technology.

You have to integrate in the MTS file the following:
Code: [Select]
<ModelTemplates>

  <Model name="Template Name"

         description="This is the description."

         location="MyTemplatePackage.xml"

         default="yes"

         icon = "34"

         filter= "Filter Name"

         isFramework=false"/>

</ModelTemplates>

For more information, please look at the help file under "Incorporate Model Templates"

Cheers
Konrad
« Last Edit: April 17, 2013, 11:17:28 pm by konradw »

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: MDG Model Pattern
« Reply #2 on: April 17, 2013, 11:56:38 pm »
Hello,

I understand model pattern as package with content(recursive) which is inserted in the root of the repository as a model.

Is there a possibility to use this concept to create something at an arbitrary position in the model? A template for a component usually isn't located at root level.

Thanks,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Konrad Wieland

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: MDG Model Pattern
« Reply #3 on: April 18, 2013, 12:16:14 am »
Helmut,

I don't think that this is possible.
But for these cases I would use the UML patterns. You can also put these patterns into a custom toolbox.

Of course an other alternative would be to import the generted XML file manually or with the help of a script/plug-in.

Cheers
Konrad

Danor

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: MDG Model Pattern
« Reply #4 on: April 18, 2013, 12:43:35 am »
@Konrad :
thanks :) that was exactly what I needed. Just one more question. The snippet you postet contains ... isFramework=false" ... a " is missing. But what does this do ? I earsed it because it wasn't in my help context.

@Helmut:
I'm not quite sure if I got you right, but if you select first a a package in the project browser and then push "new model from pattern" it will be added in that package and not the root of the repository.


Konrad Wieland

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: MDG Model Pattern
« Reply #5 on: April 18, 2013, 12:46:53 am »
From the EA help file:
Quote
isFramework: Defines the possible uses of a model pattern; there are three possible values:

· isFramework="true" - never strip GUIDs; the Pattern is intended as a re-usable package for any model

· isFramework="optional" - prompt to strip GUIDs; the Pattern is intended as a re-usable package, but the user can choose  

· isFramework="false" - always strip GUIDs (the default, if not stated); the Pattern could be applied multiple times within the one model
  

Cheers
Konrad

Konrad Wieland

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: MDG Model Pattern
« Reply #6 on: April 18, 2013, 12:49:54 am »
Ok, Model Patterns can also be integrated below the selected package. I was also convinced that they are applied always below the root package.

Cheers
Konrad

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: MDG Model Pattern
« Reply #7 on: April 18, 2013, 01:23:53 am »
Thanks a lot!

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)