Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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

0 votes



One answer

Permanent link

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).

0 votes

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 

RMM Model

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

RPE template





 The results are:


RPE output for element_level

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 log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,024

Question asked: Mar 02 '21, 1:33 a.m.

Question was seen: 1,982 times

Last updated: Mar 03 '21, 1:21 p.m.

Confirmation Cancel Confirm