jazz Java APIs did not find process parent-child relationship if the two project areas are in different CCMs
Rick Liu (11●1)
| asked Sep 26 '17, 5:26 p.m.
edited Sep 27 '17, 4:07 p.m. by Geoffrey Clemm (30.1k●3●30●35) Hello all, I tried to use below jazz Java APIs to get process parent-child relationship among project areas in RTC; and found out that if the parent project area is in different CCM, the APIs treated the child project area as a regular project (no parent relationship). RTC Web GUI allows users to create such parent-child relationship. Could anyone advise how to solve this issue? Thanks, Rick
import org.eclipse.core.runtime.IProgressMonitor;
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Sep 27 '17, 8:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Sep 27 '17, 9:11 a.m. Dang,
|
I saw that if the process content is located in another repo, the project area data populated:
else { // check if the parent project is in a remote repo
Comments I think I have shared what I can in my comment. The code above is missing too much e.g. so no one can even understand what it is doing.
My comment:
If you want to follow that in the API I have explained that in https://rsjazz.wordpress.com/2014/11/28/the-process-sharing-api/ I have looked into working with multiple CCM's in another context and I think you can do it by having multiple logins using separate ITeamRepository objects (one for each CCM you talk to). |
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.
Comments
Hi Ralph/Amy,
How is the parent-child relationship stored in RTC? Can we get this data by querying RTC database; or searching XML or any other data files?
Thanks,
Rick
Just to confirm, if you ask a given project area for its process parent project area, it returns nothing if the process parent project area is in another repository? Or is it that if you ask a given project area for all its process child project areas, it only returns the process child project areas that are in the same repository? (Or both?)
Hi Geoffrey,
The issue is: if I ask a given project area for its process parent project area, it returns nothing if the process parent project area is in another repository.
Here are the procedures:
1. Login the repo: ITeamRepository repo = getRepo(url);
2. Get list of projects: List<IProjectArea> projectList = getProjectArea(repo, sPm, projType);
3. Process each project to find its parent project:
for (int i = 0; i < projectList.size(); i++) {
IProjectArea ip = projectList.get(i);
Map<Object, Object> pd = ip.getProcessData();
// get the process config content object
IContent processSource = (IContent) pd.get(keyName); (keyName = "com.ibm.team.internal.process.compiled.xml")
If the process parent project area is in another repo, processSource is null.
How did you treat the process parent project areas differently when they are in the same repo or diiferent repo? Do you have different methods to handle this case in IContent, IProjectArea, or other classes?
Thanks,
Rick
The API you are using is not the API I was using in https://rsjazz.wordpress.com/2014/11/28/the-process-sharing-api/
First a disclaimer ... I don't know that code, so all I am doing now is speculating. My speculation is that the API you are using (to obtain the process content) only works if the process content is located on the same server. If you want process content that is located on another server, you need to use code like Ralph's to first obtain the process provider, and then access the process content from that provider.