Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

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

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?

0 votes



2 answers

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

0 votes


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

0 votes

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,984

Question asked: Jan 21 '11, 11:24 a.m.

Question was seen: 7,000 times

Last updated: Jan 21 '11, 11:24 a.m.

Confirmation Cancel Confirm