Type: Hot Fix Request
Affects Version/s: 18.104.22.168
When upgrading Alfresco running on MS SQL Server from version 4.2.4 to 4.2.8, the migrate-activiti-workflows.sql script is executed as part of the upgrade.
Running this sql script causes duplicate entries in act_hi_varinst table, that's entries with the same proc_inst_id_ and name_ = 'bpm_package'
When running Alfresco 4.2.4 there is just one entry for a process instance with name = 'bpm_package' in table act_hi_varinst - see image '424-entry.png'
Also executing a REST call to get process items woks fine on 4.2.4 - see image '424-rest-call.png'
After upgrading Alfresco 4.2.4 to 4.2.8 there are two entries in act_hi_varinst table for the same process id where the column name_ = 'bpm_package' - see image '428-entries.png'
This cause the rest call to get process items to fail with a 500 error with the following message: 'Query return 2 results instead of max1'
And trying to edit the workflow in Share on 4.2.8 throws an error - see image 'workflow-editing.png'
Steps to reproduce
1- install alfresco 4.2.4 with MS SQL Server
2- create a workflow (this can be a simple review & approve process for a document)
(at this point running select * from act_hi_varinst where name_ = 'bpm_package' should return just one item)
3- upgrade 4.2.4 to 4.2.8
(at this point running select * from act_hi_varinst where name_ = 'bpm_package' will return more than one item)
4- edit workflow in Share (go into workflows I've started and attempt to edit the one created in step 2)
5- run rest call - http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/processes/<proc inst id>/items
replacing proc_inst_id is the process instance number from act_hi_varinst table
We should be able to edit the workflow and to execute the rest call
Workflow update and rest call both fail