Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes

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".


Accepted answer

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

0 votes

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

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

0 votes

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.

https://rsjazz.wordpress.com/2014/11/28/the-process-sharing-api/

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

Question asked: Aug 04 '15, 7:49 a.m.

Question was seen: 3,461 times

Last updated: Aug 24 '15, 8:28 p.m.

Confirmation Cancel Confirm