Engineering Publishing - Determining recursion depth
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
myBlock1
myBlock2
mysubBlock3
mysubSubBlock4
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
Thanks
One answer
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.
Comments
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).
This is the structure I am trying to publish
I point my template to OSLC_Metamodel Package. My template is similar to above
The results are: