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
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
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.
You could only change the sharing target, in case you would use process sharing.
Comments
1 vote
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.
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
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 04 '15, 5:51 p.m.