Book a Demo

Author Topic: Document Generation: Filter child elements by stereotype  (Read 5560 times)

Jella

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • 42
    • View Profile
Document Generation: Filter child elements by stereotype
« on: July 05, 2017, 05:41:27 pm »
Hi all,

I'm relatively new to enterprise architect and couldn't find an answer to my question here, so I hope somebody of you can help me :)

I've got a template with a lot of fragments in it, these fragments refer to different child elements (artifacts), which I would like to filter by stereotype (or anything else?). In Fragment "template Chapter 1.2" for example I'd like to have only the element notes from that child element which stereotype is = "chapter 1.2". I thought I could solve that easy via Document Option: Element filter: Element stereotype contains "Chapter 1.2" in the fragment, and tick the box "include child element even if parent is filtered out". Unfortunately this wont work. I cannot put all my chapters into the section child elements><child elements in the template because I have a structured scenario which I'd like to have between two Chapters/child elements.

Has anyone a clue what I am doing wrong or how to solve this problem? Do I need to use "virtual documents" to solve it?

Thaaaank you very much for reading =)

Jella

This is what it looks like more or less:

Template:
package >
element >
diagram >
{Diagram.DiagramImg}
< diagram

Chapter 1
Chapter 1.1
{Element.Notes}
Chapter1.2
{Template - Chapter 1.2.}
scenario >
{ElemScenario.Scenario}

structured scenarios >
STEP                                                  TYPE                                         DESCRIPTION                    
{Scenario_Structured.Step}   {Scenario_Structured.Type}   {Scenario_Structured.Action}   
< structured scenarios
< scenario

Chapter 2
{Template - Chapter 2}   
....




Fragment: {Template - Chapter 1.2.}:
package >
element >
child elements >
{Element.Notes}
< child elements
< element
< package

PS: it works if I filter by Document options: exclude filter: Exclude all but "artifact" and "Use Case" --> then I would get all artifact notes but not for example requirements, constrains or object types of child elements. But with this element filter it somehow doesn't filter what I want it to filter  ???
ever tried, ever failed, no matter,
try again, fail again, fail better!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Generation: Filter child elements by stereotype
« Reply #1 on: July 05, 2017, 10:48:48 pm »
Jella,

Using virtual documents make things definitely a lot simpler.
You don't have to use the child element section, just point to the element(s) you want to document using a search.

I have documented an example of my approach on my website: https://bellekens.com/2015/11/12/tutorial-generate-complex-documents-from-enterprise-architect-with-a-two-step-semi-automated-approach/

Geert

Jella

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • 42
    • View Profile
Re: Document Generation: Filter child elements by stereotype
« Reply #2 on: July 10, 2017, 10:30:58 pm »


Thank You Geert!

I'll try that with virtual documents then!

Jella
ever tried, ever failed, no matter,
try again, fail again, fail better!