How to create project area programmatically using java API?
Hi,
We would like to create a project area programmatically using java API. Thanks |
Accepted answer
public String createProject(String name, String processId) throws TeamRepositoryException{
String msg = "Created project " + name + " with process id Name " + processId; IProcessItemService service = (IProcessItemService)repo.getClientLibrary(IProcessItemService.class); IProcessDefinition definition = service.findProcessDefinition(processId,IProcessItemService.ALL_PROPERTIES, MONITOR); if (definition == null) { throw new TeamRepositoryException("Could not find Predefined Process " + processId); } IProjectArea project = service.createProjectArea(); project.setName(name); project.setProcessDefinition(definition); service.save(project, MONITOR); // Set project access setVisibility(name,false,false,true); service.initialize(project, MONITOR); return msg; } CAIO CARLO CANDIDO selected this answer as the correct answer
|
One other answer
Ralph Schoon (63.5k●3●36●46)
| answered Aug 08 '13, 6:28 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please look at the snippets of the Plain Java Client Libraries (download in all downloads).
|
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.