[MNT-20767] Publish To Alfresco task failed with error "Related content store id not yet persisted" Created: 10-Jul-19  Updated: 12-Jul-19

Status: Open
Project: Service Packs and Hot Fixes
Component/s: APS Kickstart/Studio, APS Tasks
Affects Version/s: Alfresco Process Services 1.9.0.5, 6.1.0.4
Fix Version/s: Alfresco Process Services .N

Type: Service Pack Request
Reporter: Seng Liaw Assignee: APS Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

APS 1.9.0.5 , ACS 6.1.0


Attachments: Zip Archive SimplePublish-ProblematicSample.zip     Zip Archive SimplePublish-workingsample.zip     Text File activiti-app-error-snippet.log    
Bug Priority:
Category 1
ACT Numbers:

00991964


 Description   

Summary
Publish to Alfresco task fails if the File Attach option "Just link to files, do not copy files to Alfresco Process Services" is checked. During execution it throws an error then.

Steps to reproduce 

  1. Install APS 1.9.0.5 and ACS 6.1.0. 
  2. Start APS and ACS running. 
  3. On ACS, login to Alfresco Share (http://localhost:8181/share) for default admin, and create a new test site, called 'My test site', under Document Library, create two new folders: "Select to Publish" and "Published from APS", you will need these for later APS test to reproduce issue. 
  4. Add/Upload a couple test files into "Select to Publish" folder - which can be used for later test in APS during Attach Files task.  
  5. Leave "Published from APS" folder empty in ACS repository.
  6. On APS, login to Activiti-App UI (http://localhost:8080/activiti-app) as default APS user: admin@app.activiti.com .
  7. Navigate to Identity Management > Tenants > Alfresco Repositories, add new repository to connect to running ACS 6.1.0. 
  8. Navigate to Identity Management > Personal > Alfresco Repositories, you should now see the ACS 6.1.0 repository listed, click to enter ACS username and login credential for default admin. 
  9. Navigate to App Designer > Apps, import the attached 'SimplePublish-ProblematicSample.zip'
  10. Edit the embedded Process model 'simplePublish-problematicSample' using Visual Editor, update the Alfresco destination to point to folder path, e.g. ACS 6.1 > My Test Site > Document Library > Published from APS. 
  11. Click to view Start Event, click and open 'Referenced form',  click to edit 'SelectDocument' Attach File field, under 'Attach File option' , you can see second checkbox 'Just link to files, do not copy files to Alfresco Process Services (this also means files cannot be uploaded from one of a user's devices)' is checked. This is one of the two requirement to reproduce this issue. Leave it as it is. 
  12. Save the Process Model after you applied #10 changes, republish your imported app with newest Process Model included (with valid Alfresco Destination path changes). 
  13. Start a new process of the published 'SimplePublish-ProblematicSample' app from homepage (http://localhost:8080/activiti-app/#/). 
  14. In the SelectDocument - you only have option to Select document from ACS repository for upload - click on the 'Alfresco flower icon' Choose Site > My test site > documentLibrary > Select to Publish, click to select any uploaded files in that ACS site folder path. Click 'Start Process' button. This is second requirement to reproduce this issue, must select a document for upload from different ACS repository path than your publish to alfresco destination path set to.

Current Behavior

  1. Click on 'Show Diagram' of the running process details page, you will notice it was stuck at later 'Publish to Alfresco' task and unable to complete this. See screenshots of problematic behavior. 
  2. Check activiti-app.log and you will see an exception similar to: 
12583502 [pool-2-thread-1] ERROR o.a.e.i.a.ExecuteAsyncRunnable - Job 5122 failed
org.activiti.engine.ActivitiException: Related content store id not yet persisted acs2.txt, 1009
 at com.activiti.runtime.activiti.KickstartAlfrescoPublishDelegate.execute(KickstartAlfrescoPublishDelegate.java:120)
 at org.activiti.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34)
 at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)

See full error snippet in attached activiti-app-error-snippet.log. 

Expected behavior
The "Publish to Alfresco" task should complete successfully without any error. The attached file was published to Alfresco under
ACS 6.1 > My Test Site > Document Library > Published from APS. 

Workaround: Use attached SimplePublish-WorkingSample.zip - Everything is same as SimplePublish-ProblematicSample.zip, except the only difference is really at referenced form in Start Event for Attach Files field, under Attach File Options - I have unchecked the second checkbox 'Just link to files, do not copy files to Alfresco Process Services (this also means files cannot be uploaded from one of a user's devices)'. Follow all same steps and you will see everything is working properly then without error. 

 


Generated at Fri Jul 10 04:54:03 BST 2020 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.