Author Topic: Document Generation support for a ModelView Model Element  (Read 5256 times)

YogaMatt

  • EA User
  • **
  • Posts: 111
  • Karma: +8/-0
    • View Profile
Document Generation support for a ModelView Model Element
« on: April 06, 2016, 12:48:45 am »
Hi All

There are two very different types of ModelView in EA. One is a model element, accessible from the toolbar on most diagram types, under Artifacts. The other is the Ctrl-Shift-5 "Model Views" window.
I'm asking about is the model element type, which we're currently using to display interface catalogues (see the TOGAF model template for an example).

They work nicely. But the document generation capability in EA disregards it. I can create a template to output the interface connectors, so that's not a major problem. But stakeholders want an output which looks very much like the one you can see in the model. We could do that by running the SQL script directly on the database and export the results to Excel. But that's not joined up when it comes to managing complete documents from place.

Any ideas?

Cheers

YM

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13274
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Generation support for a ModelView Model Element
« Reply #1 on: April 06, 2016, 02:25:14 am »
You could maybe use SQL fragments in your document generation?

Geert

YogaMatt

  • EA User
  • **
  • Posts: 111
  • Karma: +8/-0
    • View Profile
Re: Document Generation support for a ModelView Model Element
« Reply #2 on: April 06, 2016, 05:39:02 pm »
Hi Geert

I'd noticed the SQL fragments, but wasn't sure it would work as the query in our model view creates derived columns e.g.

COALESCE(dest.Name,destCls.Name) + '_AND_' + COALESCE(src.Name,srcCls.Name) [InterfaceName]

When you say "maybe" - do you know that this will work?

Cheers

YM

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13274
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Generation support for a ModelView Model Element
« Reply #3 on: April 06, 2016, 07:34:23 pm »
SQL fragments are quite simple.
Your query gets executed against the database and you can use the results in your template.

So whatever works in your sql scratch pad will work in the query fragment as well.

Geert

YogaMatt

  • EA User
  • **
  • Posts: 111
  • Karma: +8/-0
    • View Profile
Re: Document Generation support for a ModelView Model Element
« Reply #4 on: April 06, 2016, 07:42:34 pm »
Good Karma for giving the confidence to apply time to this.  8)
I'll update with what we finally arrive at as a solution: another aspect we're looking to achieve is producing the output as a spreadsheet artefact, with data filter, embedded in a master document, and automate the process completely.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13274
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Generation support for a ModelView Model Element
« Reply #5 on: April 06, 2016, 08:49:34 pm »
another aspect we're looking to achieve is producing the output as a spreadsheet artefact, with data filter, embedded in a master document, and automate the process completely.

Hmm, not with standard template features.
The one thing you could try is a Document Script fragment.
That fragment is supposed to return raw RTF, an in theory you should be able to add the spreadsheet as an OLE object in plain RTF.

But that would require serious effort I'm afraid, so you'll need to ask if it is worth it for you.

An alternative is using Linked Documents. You can very easily insert the linked documents content into a document.

Geert

YogaMatt

  • EA User
  • **
  • Posts: 111
  • Karma: +8/-0
    • View Profile
Re: Document Generation support for a ModelView Model Element
« Reply #6 on: April 06, 2016, 08:51:21 pm »
Agree - thanks Geert.