Deploying/updating template to the existing PA(project Area) in RTC
Hi Team,
I am trying to update the template to the existing PA in RTC, But in Repository its failing to update with given template. Below is the code which i did. My doubt is with : area = (IProjectArea) service.save(area, monitor); area.setProcessDefinition(processDefinition); method sets the PA with appropriate template. IProcessItemService service = (IProcessItemService) teamRepository.getClientLibrary(IProcessItemService.class); IProjectArea area = null; List<?> areas = service.findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, monitor); for (Object anArea : areas) { if (anArea instanceof IProjectArea) { IProjectArea foundArea = (IProjectArea) anArea; if (foundArea.getName().equals(projectName)) { area = (IProjectArea) service.getMutableCopy(foundArea); area.setProcessDefinition(processDefinition); area = (IProjectArea) service.save(area, monitor); System.out.println("Project found: " + projectName); return area; Please help |
Accepted answer
Ralph Schoon (63.4k●3●36●46)
| answered Aug 04 '15, 7:58 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can not deploy a template in an existing project area.
You could only change the sharing target, in case you would use process sharing. sowmya M selected this answer as the correct answer
Comments
sowmya M
commented Aug 04 '15, 8:38 a.m.
Hi Ralph,
1
Ralph Schoon
commented Aug 04 '15, 10:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No, you can not - at least not easily - see about templates and project areas: https://jazz.net/wiki/bin/view/Deployment/SetupProjects
Ralph Schoon
commented Aug 04 '15, 10:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You should probably explain, what you are trying to do here before you manage to corrupt any productive project area.
sowmya M
commented Aug 24 '15, 12:21 a.m.
Hi Ralph,
|
One other answer
the only way you can update a project area 'on the fly', is to use the shared project area construct. you can change a projects 'parent' on dynamically. that is what the product does.
using a template is like a piece of paper you pulled off a pad of paper.. once its off, it cannot go back on, and nothing you do to it will change any other piece of paper or the pad it came from . there is a link to the process template used when the project was created, but it is just historical. no functional use. Comments
sowmya M
commented Aug 24 '15, 12:20 a.m.
Hi Sam,
sam detweiler
commented Aug 24 '15, 7:01 a.m.
see my sample code, the accepted answer here
https://rsjazz.wordpress.com/2014/11/28/the-process-sharing-api/ |
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
On a terminological note, you are not trying to update the "template" of an existing PA, but rather the "process configuration source" (or "process configuration XML") of an existing PA. A "process template" is an RTC artifact that you can use to initialize the process configuration of a project area, but a process template is not something that a PA "has".