Author Topic: How to skip hierarchy levels in RTF generator  (Read 3221 times)

Screwtape

  • EA User
  • **
  • Posts: 93
  • Karma: +4/-0
    • View Profile
How to skip hierarchy levels in RTF generator
« on: June 20, 2014, 05:25:23 pm »
Hi! I'm trying to produce process documentation from a hierarchy of BPMN business processes and activities. The problem is that there are pools and lanes in the diagram, which I want to keep, but I don't want to report them as hierarchy levels.

What I'm trying to get is
1.1 Business Process 1
1.1.1 Business Process 2 (In Pool 1/Lane 1 say)
1.1.1.1 Activity 1
1.1.2 Activity 2 (In Pool 1/Lane 2 say)

I've managed to get the Pools and lanes not to display, but they retain their hierarchy levels, so I'm getting

1.1 Business Process 1
1.1.1.1.1 Business Process 2 (In Pool 1/Lane 1 say)
1.1.1.1.1.1 Activity 1
1.1.1.1.2 Activity 2 (In Pool 1/Lane 2 say)

so I've got two levels of headings numbering that I don't want.

I've tried filtering out the ActivityPartition type, and selected "Include child element even if the parent is filtered out.", but that just removes all the child elements of the pools/lanes and reports only the top level. I've done this both at the master template level, or at the specific fragment level, but in both cases the "Include child element..." flag seems to be ignored.

Any ideas would be welcome!

Anyone with any ideas how to do this?
Screwtape

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: How to skip hierarchy levels in RTF generator
« Reply #1 on: June 24, 2014, 11:22:52 pm »
You might get somewhere with this approach.

Create a template fragment which outputs the custom field {Name} in the correct heading style, and add the custom query
Code: [Select]
select Name from t_object
where Object_ID = #OBJECTID#
and Object_Type not in ('ActivityPartition')
               [add any other undesirable types ^^^]
Make sure everything in the fragment template is inside the [highlight]custom>[/highlight] section.

In the parent template, add the fragment to the [highlight]element>[/highlight] section and make sure you include [highlight]child elements>[/highlight].

This way, when the select statement returns nothing the fragment won't output anything, but the document generation engine will keep digging into the hierarchy. Provided you've got the heading numbering thing happening correctly, this should work.

You can of course include other t_object columns, etc. Just make sure the heading numbering takes place in the fragment, and that the entire fragment outputs nothing for a partition.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

Screwtape

  • EA User
  • **
  • Posts: 93
  • Karma: +4/-0
    • View Profile
Re: How to skip hierarchy levels in RTF generator
« Reply #2 on: June 27, 2014, 10:30:32 pm »
Hi! Thanks for the idea - sadly it didn't work on two accounts - one is that I am looking for more than just the headings I described, which I think would make the custom fragment very complex - and secondly, each time the engine digs down a level it increases the heading level - despite the fact that there was nothing displayed at heading level 2 or 3, it goes from 1 to 4.

What I want to do is tell EA to pretend it hadn't dug down a level - just ignore those pesky ActivityPartitions and go straight to the children.

I could do that with the sql - but not then be able to process those elemenets normally, which is what I'm trying to do.

If the "Include child elements even if the parent element is filtered out" worked as it sounds like it should - it might just do what I wanted, all filtering I've tried prevents all child elemnts of excluded parents.
Screwtape