If an app contains a process, whereas the process then contains several collapsed subprocesses and in those subprocesses there are document generaiton tasks using the same document template, the app cannot be exported.
Steps to reproduce
1. Login to activiti-app as user admin holding app designer capabilities
2. Via App Deisgner create a new process and name it "DocGenSubProcess"
3. The process shall look contain start event -> document generation task -> end event
4. Configure the document generation task to make the process valid:
a) Set Document variable to "abc"
b) Upload any docx as Template
5. Save and close process
6. Create another process and name it "DocGenParentProcess"
7. The process shall contain start event -> collapsed subprocess -> collapsed subprocess -> end event
8. Configure both collapsed subprocesses to reference the earlier created "DocGenSubProcess"
9. Save and close process
10. Via App Designer create a new app "DefectDemo" and add the processes created before and save it
11. Try to export the app
App is exported just fine and download of "DefectDemo.zip" is starting
Although there is no error displayed in UI, app export is not working. Download of app zip is not happening and log file shows exception similar to:
Reproduced in current latest APS 1.11.1 release
Issue seems to be that we try to store the same document twice in the app zip that we are creating and this is causing an unexpected ebhaviour and the zip is not created.