When importing two apps from another environment, if two different processes reference the same subprocess (or call activity), publishing the apps fails and App Editor throws an error.
Steps to reproduce
[Source Environment used for export]:
- Set up APS
- Create 2 parent definitions - CollapseMain1 and CollapseMain2 (Please find attachment - SourceEnvProcesses.png)
- Create 1 sub process definition - CollapseSub (Please find attachment - SourceEnvProcesses.png) and point CollapseMain1 and CollapseMain2 to use CollapseSub as collapsed sub process
- Create and publish 2 apps - CollpaseMain1App and CollapseMain2App and use CollpaseMain1 and CollpaseSub for CollapseMain1App and use CollapseMain2 and CollpaseSub for CollpaseMain2 (Please find 4 attachments - CollapseMain1App.png, CollapseMain1App.zip and CollapseMain2App.png and CollapseMain2App.zip)
- When publishing the 2nd app, CollpaseMain2App, the system throws a warning. (Please find attachment - Error2ndAppPublishWarning.png)
- Proceed with 'confirm' and publish (Since this is a warning, not an error, system allows the publish to complete)
- Export both apps, CollpaseMain1App and CollpaseMain2App
[Target Environment used for import]:
- Import and publish CollpaseMain1App
- Import and publish CollpaseMain2App
NOTE: You can directly skip the source environment by importing the attched apps "App A.zip" and "App B.zip".
App import completes and both apps publish without any errors.
- CollpaseMain1App imports and publishes with no issue
- CollpaseMain2App imports, but upon publishing, the system throws an error - see attachment 2ndAppPublishErrorTargetEnv.png
- When navigating to the process page, there are 3 CollpaseSub process definitions in the target environment - screenshot - TargetProcessDefPage.png
- Upon importing, if APS identifies that there are existing process models, this would be the desired behavior:
1- update existing process/subprocess automatically (version)
2- create new process/subprocess appending a increment to name to make it unique in the UI to users
3- or decline occurs
- This seems to be a regression bug of https://issues.alfresco.com/jira/browse/MNT-18221
- Call Activity behaves the same way that the collapsed sub processes does. Customer's use case is tied more with the Call Activity than Collpased sub processes. Therefore, I am attaching the evidence pertaining the Call Activity as well.
This issue particularly impacts the customer since Call Activity uses the process identifier when parent process calls the sub-process. Therefore, when process identifier duplicates and customers manually edit the id's, the parent Call Activity subprocess id has to be edited as well, which causes significant manual updates when the process is complex.