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:
left side: 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)); I would really appreciate any hint on this topic.deleteCreatedProcessDefinition(definition); Best regards, Richard |
Accepted answer
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) {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
Comments
Ralph Schoon
commented Feb 10 '16, 12:09 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
Ralph Schoon (63.5k●3●36●46)
| answered Feb 10 '16, 4:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
Comments
Richard Pohl
commented Feb 10 '16, 11:08 a.m.
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
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.