It's all about the answers!

Ask a question

Engineering Publishing - Determining recursion depth

Peter Morgenthaler (102714) | asked Mar 02 '21, 1:33 a.m.

 Hi, I am reporting on an RMM model which has a recurring query


rmm/ArchitectureElements/ArchitectureElement/Aggregates/ArchitectureElement (for level 1)

rmm/ArchitectureElements/ArchitectureElement/Aggregates/ArchitectureElement/Aggregates/ArchitectureElement (for Level 2)

rmm/ArchitectureElements/ArchitectureElement/Aggregates/ArchitectureElement/Aggregates/ArchitectureElement/Aggregates/ArchitectureElement (for Level 3)

Setting a container with a Segment of 2 and recuring depth of 4 gets all of the items I am after however I can not determine what depth the items are.

It appears that RPE only increments the _element_level when a package is found and not when a block contains another block.

My structure is similar to this

Top Package





I want to use recursion and set

datasource to "Top Package" and recurse through each element and publish it like

Level 1 - Top Package

Level 2 - myBlock1

Level 2 - myBlock2

Level 3 - mysubBlock3

Level 4 - mysubSubBlock4

If the _element_level is limited to packages only (why???) and how can I achieve what I am after.

My initial thoughts are get the query in the recursion container and count the /Aggregates/ArchitectureElement/ but I can not find a way to get the query.

Any suggestions on how to solve this very welcome


One answer

permanent link
Subramanya Prasad Pilar (4.5k14) | answered Mar 02 '21, 7:48 a.m.
edited Mar 02 '21, 7:50 a.m.

In case of RMM, everything is an architecture element and you can get the level using internal variable _element_level irrespective of architect element type.

It should be enough if you set recursion only on query rmm/ArchitectureElements/ArchitectureElement/Aggregates/ArchitectureElement.

In the example below, recursion is applied only on $59 (recursive level = 4, segments = 2) and not for $58 (by default recursive level = 0, segments = 1).

Peter Morgenthaler commented Mar 02 '21, 5:23 p.m. | edited Mar 02 '21, 5:52 p.m.

 Hi, I agree that this should work however the _element_level is NOT being set. All elements are being returned as 1. I have tried capturing it as a javascript variable and also just put a text box and display_element_level but either way sets the value as 1 (which is the default when it is not set).

Peter Morgenthaler commented Mar 02 '21, 6:06 p.m.

 This is the structure I am trying to publish 

RMM Model

I point my template to OSLC_Metamodel Package. My template is similar to above

RPE template

Peter Morgenthaler commented Mar 02 '21, 6:06 p.m.

 The results are:

RPE output for element_level

Subramanya Prasad Pilar commented Mar 03 '21, 1:19 p.m. | edited Mar 03 '21, 1:21 p.m.
Can you show the data source is configured? I do not see any issue. Attaching the package exporer and RPE output from my simple template shown above:

Your answer

Register or to post your answer.