Welcome to the Jazz Community Forum
IProcessClientService doesn't exist?

I'm trying out the code to create Work Items programmatically, and there's a piece in the plain Java that looks like
But the IProcessClientService doesn't seem to exist, I can't actually import anything. There's others that are similar to it, like IProcessRestService, IProcessService, etc. And I've tried them all, and none of them work. Any ideas?
IProcessClientService processClient= (IProcessClientService)teamRepository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient=(IAuditableClient)teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient)teamRepository.getClientLibrary(IWorkItemClient.class);
URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);
But the IProcessClientService doesn't seem to exist, I can't actually import anything. There's others that are similar to it, like IProcessRestService, IProcessService, etc. And I've tried them all, and none of them work. Any ideas?
2 answers

Hi,
not sure what is wrong. If you are logged into the repository the service should be there. This has worked for me in the past.
not sure what is wrong. If you are logged into the repository the service should be there. This has worked for me in the past.
try {
// Login into team repository
// TODO: This should really be something picked in the Wizard
targetRepository = TeamPlatform
.getTeamRepositoryService().getTeamRepository(
REPOSITORY_ADDRESS, monitor);
targetRepository
.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return REPOSITORY_USER;
}
public String getPassword() {
return USER_PASSWORD;
}
};
}
});
monitor.subTask("Contacting " + targetRepository.getRepositoryURI()
+ "...");
targetRepository.login(monitor);
monitor.subTask("Connected");
// Find process area and team area
// service used to find process and team area
IProcessItemService processItemService = (IProcessItemService) targetRepository
.getClientLibrary(IProcessItemService.class);
I'm trying out the code to create Work Items programmatically, and there's a piece in the plain Java that looks like
IProcessClientService processClient= (IProcessClientService)teamRepository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient=(IAuditableClient)teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient)teamRepository.getClientLibrary(IWorkItemClient.class);
URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);
But the IProcessClientService doesn't seem to exist, I can't actually import anything. There's others that are similar to it, like IProcessRestService, IProcessService, etc. And I've tried them all, and none of them work. Any ideas?

Hello,
Do you get any error, or does the getClientLibrary call just return null? Is there anything in the Console?
Thanks,
Martha
Jazz Developer, Process Team
Do you get any error, or does the getClientLibrary call just return null? Is there anything in the Console?
Thanks,
Martha
Jazz Developer, Process Team
Hi,
not sure what is wrong. If you are logged into the repository the service should be there. This has worked for me in the past.
try {
// Login into team repository
// TODO: This should really be something picked in the Wizard
targetRepository = TeamPlatform
.getTeamRepositoryService().getTeamRepository(
REPOSITORY_ADDRESS, monitor);
targetRepository
.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return REPOSITORY_USER;
}
public String getPassword() {
return USER_PASSWORD;
}
};
}
});
monitor.subTask("Contacting " + targetRepository.getRepositoryURI()
+ "...");
targetRepository.login(monitor);
monitor.subTask("Connected");
// Find process area and team area
// service used to find process and team area
IProcessItemService processItemService = (IProcessItemService) targetRepository
.getClientLibrary(IProcessItemService.class);
I'm trying out the code to create Work Items programmatically, and there's a piece in the plain Java that looks like
IProcessClientService processClient= (IProcessClientService)teamRepository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient=(IAuditableClient)teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient)teamRepository.getClientLibrary(IWorkItemClient.class);
URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);
But the IProcessClientService doesn't seem to exist, I can't actually import anything. There's others that are similar to it, like IProcessRestService, IProcessService, etc. And I've tried them all, and none of them work. Any ideas?