jazz Java APIs did not find process parent-child relationship if the two project areas are in different CCMs
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;
import com.ibm.team.repository.client.IItemManager;
import com.ibm.team.repository.client.ITeamRepository;
import com.ibm.team.repository.client.TeamPlatform;
import com.ibm.team.repository.common.IContent;
import com.ibm.team.repository.common.TeamRepositoryException;
import com.ibm.team.process.client.*;
import com.ibm.team.process.common.IProjectArea;
import com.ibm.team.process.common.IProjectAreaHandle;
import com.ibm.team.process.internal.common.ProjectArea;
2 answers
Dang,
I missed the point here. I saw parent child. Parent child only exists as links between work items.
What this seems to be about is Process Sharing, where a project area provides the process that is shared. This works across ccm's. Sorry for the misunderstanding.
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 did not look into cross CCM's back then. 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). However, as I have not tried that myself, I can not tell how to do that in this context.
I saw that if the process content is located in another repo, the project area data populated:
internalRemoteProcessProviderUrl: https://rtc.nam.nsroot.net/rbcasa1/process/project-areas/_kInBAcqLEeW9kJcCKCKgdA
Is there a method to get the name of that process?
I tried below code; and got error.
else { // check if the parent project is in a remote repo
IProcessProviderCacheItemHandle ichandle = ((ProjectArea) ipi).getRemoteProcessProvider();
if (ichandle != null) {
String rurl = ((ProjectArea) ipi).getRemoteProcessProviderUrl();
// rurl = https://rtc.nam.nsroot.net/rbcasa1/process/project-areas/_kInBAcqLEeW9kJcCKCKgdA
rurl = "https://rtc.nam.nsroot.net/rbcasa1"; (hard code to test below methods)
if (loginRepo (rurl, userID, passWd, sPm) != null) {
// get the repository object where we are connecting
ITeamRepository repo2 = getRepo(rurl);
IProjectArea pProject = (IProjectArea) (repo2
.itemManager().fetchCompleteItem(ichandle,
IItemManager.DEFAULT, sPm));
System.out.println("have parent project name = "
+ pProject.getName());
....
}
Comments
Rick Liu
Sep 27 '17, 4:05 p.m.Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Sep 27 '17, 4:09 p.m.Rick Liu
Sep 28 '17, 3:23 p.m.Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Sep 28 '17, 9:05 a.m.Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Sep 28 '17, 3:28 p.m.