Book a Demo

Author Topic: Model Documents based on SQL Search and template fragments  (Read 4283 times)

TonyN

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Model Documents based on SQL Search and template fragments
« on: February 13, 2017, 05:17:59 pm »
Hi Peeps,

I have a model document that uses a custom SQL search of the model to return a number of different objects.
In the template attached to the model document I have fragment that is a template selector to deal with each type of object returned, the selector works fine and selects the correct  fragment for the object found.

However one of the object has number of child elements so I set up its particular fragment to report on the child elements.  When I use this in the model document that returns objects via the SQL search none of the child elements are returned. 

When I run the same template (with the selector fragment) against a package the the child elements get returned correctly. What am doing wrong?  The problem only occurs when using the an SQL search against a model document with the template.

TIA,
Tony

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Model Documents based on SQL Search and template fragments
« Reply #1 on: February 13, 2017, 05:44:10 pm »
Tony,

I believe the child elements section doesn't work with SQL fragments.
You might consider that a bug and report it as such.

Geert

TonyN

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Model Documents based on SQL Search and template fragments
« Reply #2 on: February 13, 2017, 09:59:49 pm »
HI Geert,

I it is not an SQL Fragment the setup is as follows
<<model document>> someReport
  tag values
  RTFTemple = myTemplate
  SearchName = testSearch
  SearchTerm = UseStory

myTemplate contains a selector fragment and one of those fragments reports on an element that has child elements and it does not report them.  use myTemplate against a package and the elements in the package the have children do have the children reported.  something funny with the way the SQL report changes the way a template behave.

Any better ideas?
 

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Model Documents based on SQL Search and template fragments
« Reply #3 on: February 14, 2017, 01:26:55 am »
I know, I'm sorry, I did mean a template that uses an SQL search as input (as opposed to using a package as input).
I think I've had the same issue a while ago when doing templates.

I think I solved it by creating model documents for each individual element I needed in the document, so also a model document for each of the "child" elements.

The creation of the virtual document was scripted so the users didn't have to do that all manually.

Geert