Book a Demo

Author Topic: MDG and linked documents (Document Artifact)  (Read 5125 times)

spirax

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
MDG and linked documents (Document Artifact)
« on: January 13, 2010, 10:13:43 am »
Hello,
I want to deploy a Document artifact with my MDG.

The idea being that the end user drags the element from a custom toolbox onto their diagram, and can double-click it to open a linked document (generated from a template - ie not a blank doc) which they then  customise for their project.

While I have been able to create the toolbox, and include the template of the linked document in my MDG tech file, when the end user drags the element from the toolbox onto their diagram there is no linked document attached to it. They must create a linked document for the element (Ctrl-Alt-D) and select the correct template in the message box.

Is there a way to create a linked document automatically each time an element is created by dragging it onto the diagram?

Thanks

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: MDG and linked documents (Document Artifact)
« Reply #1 on: January 13, 2010, 10:37:00 am »
The way I would do this is: create a document artifact on a diagram and give it a linked document containing your template, save the diagram as a UML Pattern, include the UML Pattern in your MDG Technology, add an item to your custom toolbox to drop the UML Pattern onto a diagram. Instructions in help file. HTH.
The Sparx Team
[email protected]

spirax

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: MDG and linked documents (Document Artifact)
« Reply #2 on: January 13, 2010, 01:23:10 pm »
Thanks,
this looks like it should work, but when the element is dragged from the toolbox onto the diagram, nothing is added.

The instructions state that the toolbox item (attribute of the stereotype) must be named like this:
MyTechnology::MyPattern(UMLPattern)

I assume this is the name of the MDG tech as it appears in the 'MDG Technologies' window, and the pattern name as it appears in the 'Save Diagram as UML Pattern' window. Which is what I've done.

Any ideas as to why this might not be working for me (I've added the pattern to the MDG tech when generating it)?

« Last Edit: January 13, 2010, 01:24:22 pm by spirax »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: MDG and linked documents (Document Artifact)
« Reply #3 on: January 13, 2010, 01:35:49 pm »
It needs to be the technology ID, not name. If you open your technology XML file in a text editor, you will see the ID on the second line.
The Sparx Team
[email protected]

spirax

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: MDG and linked documents (Document Artifact)
« Reply #4 on: January 13, 2010, 02:30:12 pm »
Thank you!  
works like a charm now - apart from the 'Add pattern...' dialog box the user must click through but we can live with that.

May I suggest that the Help text is changed? It currently states:
"...where MyTechnology is the name of the technology...".

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: MDG and linked documents (Document Artifact)
« Reply #5 on: January 13, 2010, 02:46:59 pm »
The Help has already been updated as requested, for the upcoming new release of Enterprise Architect.
Best Regards, Roy