Engineering Publishing - Determining recursion depth
Hi, I am reporting on an RMM model which has a recurring query
eg
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
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.
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).
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).
Peter Morgenthaler
commented Mar 02 '21, 6:06 p.m.
This is the structure I am trying to publish I point my template to OSLC_Metamodel Package. My template is similar to above
Peter Morgenthaler
commented Mar 02 '21, 6:06 p.m.
The results are:
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
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.