Author Topic: Document generation starting at heading level 2 - problem with child packages  (Read 2956 times)

Farkas

  • EA Novice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Hi everyone,

I recently tried to reproduce my company's quite complex internal specification template in the EA document generation templating feature. We are aiming to use both master documents/model documents and the custom document generation feature.

My main template is the following (comments in the brackets):
Code: [Select]
package >
{Pkg.Name} [as heading level 2]
... some data ...

diagram >
{Diagram.DiagramImg}
{Diagram.Name}
{Diagram.Notes}
< diagram

element >
{Template - mytemplate_for_usecases}
< element

child packages >
< child packages
< package

And the 'mytemplate_for_usecases' is like this:
Code: [Select]
package >
element >
{Element.Name} {Element.Alias} [as heading level 2]
{Element.Notes}
... other data ...
< element
< package

What I've achieved is that I can generate a package with usecases starting from heading level 2. This is needed, because our specifications usually have the following outline:
1. Use Case(s) [fixed text as heading level 1]
1.1. Package containing use cases [generated from EA as heading level 2]
1.1.1. Use Case 1 [as heading level 3]
1.1.1.1. ... some connected/children elements (e.g. boundaries, controls, entities) [as heading level 4 or higher]
1.1.2. Use Case 2 [as heading level 3]
1.1.2.1. ... some connected/children elements (e.g. boundaries, controls, entities) [as heading level 4 or higher]
2. Domain model [fixed text as heading level 1]
2.1. Domain package 1 [generated from EA as heading level 2]
2.1.1. Domain class 1 [as heading level 3]
2.1.2. Domain class 2 [as heading level 3]
2.2. Domain package 2 [generated from EA as heading level 2]
2.2.1. Domain class 3 [as heading level 3]
2.2.2. Domain class 4 [as heading level 3]
...

My problem is that with this template I cannot manage to generate the child packages of the main package in higher heading level (in this example heading level 3).
So with the templates above EA 16.1 generates the following outline:
1.1. Package1 containing use cases [heading level 2]
1.1.1. Use Case 1 [as heading level 3]
1.1.2. Use Case 2 [as heading level 3]
1.2. Subpackage of Package1 [heading level 2]
1.2.1.1. Use Case 3 [interestingly as heading level 4]
1.2.1.2. Use Case 3 [interestingly as heading level 4]

But I would like to have this:
1.1. Package1 containing use cases [heading level 2]
1.1.1. Use Case 1 [as heading level 3]
1.1.2. Use Case 2 [as heading level 3]
1.1.3. Subpackage of Package1 [heading level 3]
1.1.3.1. Use Case 3 [as heading level 4]
1.1.3.2. Use Case 3 [as heading level 4]

However I try, I'm not able to achieve this outline.
Can anyone point me to the right direction what to try, or howto implement this?
(I searched this forum, EA documentation and other sources , but I haven't found solution - this must be something quite obvious or something too hard - I hope for the first one :) )

Thanks in advance,
Farkas

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
You'll probably have to build your template without the childpackages.
And use virtual documents to build the differnt parts of your document.

Geert

Farkas

  • EA Novice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
So, are you suggesting to not include childpackages into the template, and to create a template starting with heading level 3, then use the original (HL2) template to generate the main package and the new (HL3) template to generate the child package?

In a virtual document structure:
<<master document>> My Specification Test
|-- <<model document>> Main package [RTFTemplate = template_starting_with_HL2]
|  |-- Main package [as attribute of model document]
|
|-- <<model document>> Main package [RTFTemplate = template_starting_with_HL3]
   |-- Child package [as attribute of model document]

This can work, but to be honest, this requires a little bit new mindset to generate documentation.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
So, are you suggesting to not include childpackages into the template, and to create a template starting with heading level 3, then use the original (HL2) template to generate the main package and the new (HL3) template to generate the child package?

In a virtual document structure:
<<master document>> My Specification Test
|-- <<model document>> Main package [RTFTemplate = template_starting_with_HL2]
|  |-- Main package [as attribute of model document]
|
|-- <<model document>> Main package [RTFTemplate = template_starting_with_HL3]
   |-- Child package [as attribute of model document]

This can work, but to be honest, this requires a little bit new mindset to generate documentation.

Yes, something like that. The advantage of this approach is that you can make your templates much smaller and simpler.
We often even have multiple model documents per element.

Geert

Farkas

  • EA Novice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Okay, thank you very much for your help, I'll try this out!