API support for hierarchical components (How to get information about containment relations via API?)
![]()
Alexander Schulz (11●1●2)
| asked Jun 03 '15, 8:36 a.m.
edited Jun 03 '15, 3:10 p.m. by DJ Houghton (266●3)
Hello SCM team,
From 6.0 it is possible to create components hierarchies (HC). So now we want to take the "containment relation" as a basis for the creation the Load Rule, which then creates the sandbox structure. In other words: "if component B is a subcomponent of component A, then it will be loaded as ..../sandbox/A/B" Question: Can you please provide us the HC related API documentation with some examples? Thank you in advance! |
2 answers
![]()
Hi Alexander, since hierarchical components is a new feature we're still flushing out the documentation before the official release but you can see an introduction in the New and Noteworthy here [1].
I'll look at putting together a code example, but a good starting point is IFlowNodeConnection#getComponentHierarchy. This will return a dictionary-like structure that you can traverse to determine the parent/child relationships. [1] https://jazz.net/downloads/rational-team-concert/milestones/6.0M11?p=news#new-workspace-configuration |
![]()
Hi Alexander, unfortunately I've confirmed that we don't yet have APIs which will allow you to create Load Rules files based on an existing component hierarchy in the repository. There are some Load Rules creation commands available with the Command-Line Interface, but they examine your current sandbox and generate a file from what you have loaded. (and it is not yet hierarchical component aware)
But given that this is an operation which multiple clients would like to perform, it is something which is definitely being discussed on the development team and we would like to enable users to be able to do this. Comments ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi DJ ... Note that what was being here was not whether there was an API like "GenerateLoadRulesFromConfigurationHierarchy() ... but rather what is the API for traversing the component hierarchy in a given stream/workspace. They can then use that plus knowledge of the syntax of load rule files to write out text to a file which can then be used as a load rule file. In other words, your other answer is the one they were looking for (Alexander: Please correct me if I got that wrong).
Hello DJ, hello Geoff,
Ok, cool. I was hesitant to suggest manually constructing the Load Rules file but if you already have a process in place to do this, then the API on IFlowNodeConnection is likely what will interest you.
|