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

Export process template from project area via API: Why do file name suffixes in processdescription.zip change between subsequent exports?

Hi,

First, I have to mention that I use a custom tool for export/importing process templates via RTC Plain Java Client API).

What I target at with this question is understanding the process of how and when the processdescription.zip (inner zip file in the template's export zip file) is generated during export via API. Just to give you an overview – the following workflow steps lead me to my question:

  1. Create a new project area (PA) from a template on RTC.
  2. Export the template from this PA with the mentioned tool. This includes downloading and extracting the template ZIP file and moving/renaming some files in the attachments.
  3. Update a project area on RTC with content from the template on the local file system using the tool from step 2. No changes in the exported template between step 2 and step 3.
  4. Export the template from RTC again as in step 2.
After this, I use a merge tool (in my case BeyondCompare 3) to merge the directory created in step 4 into the directory created in step 2. This works perfectly with one exception. The file processDescription.zip shows a difference. When I look into it, it contains for example the following files:

left side:
ProcessDescription.Formal_Project_Management_Process_Templa._zn7qQMTvEeW-ibGVJnpTpA.zh_TW._zn7qT8TvEeW-ibGVJnpTpA.xml

right side:
ProcessDescription.Formal_Project_Management_Process_Templa._pGZlMMTvEeW-ibGVJnpTpA.zh_TW._pGZlP8TvEeW-ibGVJnpTpA.xml

All files on the left side have the same suffix in their file name (printed in bold in the above example). The same for the right side. But the suffixes are different between left and right. Where do the suffixes come from? Why do they differ?

It would help me a lot if someone could tell me what the suffix of the files in the processdescription.zip means (e.g. "_zn7qQMTvEeW-ibGVJnpTpA.zh_TW._zn7qT8TvEeW-ibGVJnpTpA"). To me it looks like a UUID. Why does it change between subsequent exports? Is it because I update the PA content with my tool or is it just generated during the export of the template. Is there a way to avoid this behavior (e.g. to make this suffix constant between subsequent exports)?

Side note: The API calls used to export the template from a PA in my tool:
IProcessDefinition definition =((ProcessClientService) this.service).createProcessDefinitionFromProjectArea(projectAreaHandle,this.rtcProjectAreaName, this.rtcProjectAreaName.toLowerCase(), "", this.monitor);
	
IContent content =((IProcessInternalClientService) this.teamRepo.getClientLibrary(IProcessInternalClientService.class)).createProcessDefinitionExportZip(definition.getItemId().getUuidValue(), new SubProgressMonitor(subProgressMonitor, 200));
	
deleteCreatedProcessDefinition(definition);	
	
I would really appreciate any hint on this topic.

Best regards,
Richard

0 votes


Accepted answer

Permanent link
I played around a little with the source code of the tool.

The following changes seem to produce the behaviour I actually require.
definition = findExistingProcessDefinition();
if (definition == null) {
definition = ((ProcessClientService) this.service).createProcessDefinitionFromProjectArea(projectAreaHandle,this.rtcProjectAreaName, this.rtcProjectAreaName.toLowerCase(), "", this.monitor);
}
/* ... (export as shown above) */
// REMOVED deleteCreatedProcessDefinition(definition);
Is this a safe solution? Does it have any side effects? I mean are there cases where some external instance deletes the process definition and it will be created again?

The reason why I am asking is that I suspect that the person who originally wrote the code had some reason for doing it the way it is.
Ralph Schoon selected this answer as the correct answer

0 votes

Comments

If you use the API, there is always a risk that you do something wrong. As long as you don't store the process definition as a template, you should be fine, I guess. A reason why the UUID was used, was maybe to prevent issues with storing it.


One other answer

Permanent link
You create a process definition from a process area. Each time you do this, the process definition is a new item that potentially needs to be stored in the process template section. So, I would assume that the value you see is the unique UUID created for this process template.

0 votes

Comments

Thank you for your reply. I checked it and you are right. The suffix is the UUID of the process definition. Do you see any option to prevent it from being generated into the file names? Or is it possible to reuse the process definition among several exports?

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,938
× 411

Question asked: Feb 09 '16, 6:35 a.m.

Question was seen: 4,150 times

Last updated: Feb 10 '16, 12:09 p.m.

Confirmation Cancel Confirm