Deploying/updating template to the existing PA(project Area) in RTC
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 could only change the sharing target, in case you would use process sharing.
Comments
Hi Ralph,
Can we update an Template to an existing PA?
No, you can not - at least not easily - see about templates and project areas: https://jazz.net/wiki/bin/view/Deployment/SetupProjects
Once the template is deployed, and used to create a project area, it describes the process of the project area and is no longer a template. I know that some people do magic in the process configuration XML directly, instead of using the process customization, however, you must know what you are doing.
If you would just copy paste the process over form another project area for example, you could render the project area unusable, unless you get a working process XML from the history available on the process configuration source and copy it back in.
1 vote
You should probably explain, what you are trying to do here before you manage to corrupt any productive project area.
Hi Ralph,
Thanks for the reply, I would like to know, how can we update a project Area using shared project area construct using RTC API in java.
One other answer
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
Hi Sam,
Thanks for the reply, I would like to how, how can we update a project Area using shared project area construct using RTC API in java.
see my sample code, the accepted answer here
https://jazz.net/forum/questions/159700/is-it-possible-to-migrate-an-rtc-project-area-to-a-different-process-parent-programmatically
https://rsjazz.wordpress.com/2014/11/28/the-process-sharing-api/
Comments
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 04 '15, 5:51 p.m.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".