It's all about the answers!

Ask a question

Can not delete the processDefination of template, if ProjectArea and template Name are same.


ast java (4512049) | asked Sep 02 '16, 8:27 a.m.
Hi Team,

I am trying to deleting the processDefination of the template if its already existing and then i will re-create the defination and export the projectArea. But, if ProjectArea name and template name are same , then it fails to deletes the processDefination with below exception( That template is not referred with any other project Area).
com.ibm.team.repository.common.TeamRepositoryException: Process template referenced by existing project area 'Applarchteam_Test999'
Below is the code template
if (this.service instanceof ProcessClientService) {
      
        IProcessDefinition old =
            ((ProcessClientService) this.service).findProcessDefinition(this.rtcProjectAreaName.toLowerCase(),
                null, this.monitor);
        if(null != old){
        ((ProcessClientService) this.service).delete(old, true, monitor);  ----> this is where the exception is throwed
        }    
          definition =
              ((ProcessClientService) this.service).createProcessDefinitionFromProjectArea(projectAreaHandle,
                  this.rtcProjectAreaName, this.rtcProjectAreaName.toLowerCase(), "", this.monitor);
                   //API to export
      }

Be the first one to answer this question!


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.