Type: Service Pack Request
Affects Version/s: Alfresco Activiti 1.5.2, Alfresco Process Services 1.7, Alfresco Process Services 1.9
Fix Version/s: Alfresco Process Services 1.12
Component/s: APS Tasks
00764417, 00976173, 00988886
Sprint:Docs Sprint 18, APS Sprint 30
Update Alfresco Properties task fails after publishing to Alfresco task if a new version of the published document was created in Alfresco in between
Steps to reproduce
1.) Install Alfresco One 22.214.171.124 running on default port 8080 and via Alfresco Share create a public site called "publicsite" as administrator
2.) Install Activiti 1.5.2 using port 8090
3.) In Activiti App go to Identity Management -> Tenants and select "Alfresco Repositories" and add the config for your Alfresco repository like the following and save:
4.) Via the "Personal" tab (http://localhost:8090/activiti-app/idm/#/profile) click on "localhost8080" under "Alfresco Repositories" and enter the administrator credentials for Alfresco One
5.) Go to Kickstart App and create a new Process with BPMN Editor called "UpdatePropertyPointsToOldVersion"
6.) On the Start Event, select "Referenced form" and create new form called "Upload file"
7.) Add "Attach" form control and edit label "Publish to Alfresco:"
8.) Click on Save / Save and close editor
9.) Drag and drop a "Publish to Alfresco task" into the model and add a sequence flow from the Start event to it
10.) Click on "Alfresco destination" and set the following:
11.) Add a human task and name it "Edit Title" Connect the publish to Alfresco task to the human task.
12.) Select "Referenced form" for the human task and create a new form called "FileMetadata"
13.) Add a text form control and edit its label to "Title"
14.) Drag and drop an "Update Alfresco properties" task to the model and add a sequence flow from the human task to it
15.) For the Update Alfresco properties tasks configure the "Alfresco properties" as followed:
16.) Add an End event and connect the Update Alfresco properties task with it. Validate and save the process.
17.) Via Kickstart create an app called "UpdatePropertyPointsToOldVersion" and add process model "UpdatePropertyPointsToOldVersion". Save and publish the app
18.) Validate the process is working: Open the application and start a process, upload a file in the start form. In the following task edit the title field and complete the task to finish the process. Check in Alfresco Share that the document was added and its title property is as set.
19.) Start another process and upload another document. Do not change the title field yet.
20.) In Share, browse to the file just uploaded and add a new version of the same file. Version is now 1.1 instead of 1.0
21.) Back in Activiti app, proceed to edit the title and complete the task.
22. ) Review document and it´s title property in Alfresco Share
- Update properties task should have worked on the latest version of the document.
- Property was not updated by the task and the following exception occurs in Activiti logs:
- The related method putContentMetadata does not check if it has the latest version of a document while trying to update the metadata of a document using cmis:
This results in the given exception if in the meanwhile (between the initial upload of a document using a "Publish to Alfresco Task" and the execution of a "Update Alfresco properties" Task) a new version of the document has been uploaded in Alfresco.
- Reproduced in latest Activiti release 1.5.2