It's all about the answers!

Ask a question

Deploying/updating template to the existing PA(project Area) in RTC


sowmya M (1918) | asked Aug 04 '15, 7:49 a.m.
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

Comments
Geoffrey Clemm commented Aug 04 '15, 5:51 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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
Ralph Schoon (63.1k33646) | 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,
Can we update an Template to an existing PA?


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

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.


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,
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
sam detweiler (12.5k6195201) | answered Aug 04 '15, 7:39 p.m.
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,
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.



Ralph Schoon commented Aug 24 '15, 8:28 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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

Your answer


Register or 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.