Not possible to export app that contains several subprocesses referencing same document template

Description

Summary
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

Expected behaviour
App is exported just fine and download of "DefectDemo.zip" is starting

Current behaviour
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:

Supporting evidence

  • 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.

Environment

None

Testcase ID

None

Assignee

Unassigned

Reporter

Dennis Koch

Labels

None

ACT Numbers

01021908

Security Issue

None

Patch Attached

None

Premier Customer

None

Prioritization Score

None

Delivery Team

None

Build Location

None

Cloud or Enterprise

None

Bug Priority

Category 2

Work Funnel End

None

Escalated By

None

Dependent Version/s

None

Regression Since

None

Code Branch

None

Components

Fix versions

Affects versions