Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-19767

Duplicate entries in act_hi_varinst after upgrading Alfresco 4.2.4 to 4.2.8 on MS SQL Server

    Details

      Description

      Problem description
      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

      Expected results
      We should be able to edit the workflow and to execute the rest call

      Actual resuts
      Workflow update and rest call both fail

       

       

        Attachments

        1. 424-entry.png
          424-entry.png
          31 kB
        2. 424-rest-call.png
          424-rest-call.png
          22 kB
        3. 428-entries.png
          428-entries.png
          34 kB
        4. 428-rest-call.png
          428-rest-call.png
          356 kB
        5. workflow-editing.png
          workflow-editing.png
          93 kB

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  mrodriguez Miguel Rodriguez
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel