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

API support for hierarchical components (How to get information about containment relations via API?)

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!

0 votes



2 answers

Permanent link
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

0 votes


Permanent link
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.

0 votes

Comments

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,

yes the answer #1 is one in which we are more interested in. We have already a LR generator, which is creating LR depends on the name of the component. (Comp. Name represents the sandbox hierarchy)

If we would have access to the containment relation information from the components in a stream, we would switch over to the usage of the "containment" as a basis for the LR generation.

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.

Internally, we've used the visitor pattern to walk the component hierarchies and find that pretty handy so you may choose to take a similar approach.

Let us know if you have any more questions.

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
× 10,938
× 1,202

Question asked: Jun 03 '15, 8:36 a.m.

Question was seen: 4,357 times

Last updated: Jun 09 '15, 8:44 a.m.

Confirmation Cancel Confirm