Uploaded image for project: 'Alfresco One Platform'
  1. Alfresco One Platform
  2. ACE-4493

[Upgrade] Workflow Type filter is not applying for some activiti workflows after upgrade from 4.1.10 (WorkflowInstancesGet for PARAM_DEFINITION_NAME does not show active but old task instances.)

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Component/s: Workflow
    • Labels:
    • Environment:
      Alfresco Enterprise v4.1.10 (.5 r112167-b52) schema 5151
      Alfresco Enterprise v5.1.0 (r114823-b298) schema 9009
    • Security Severity:
      None
    • Testcase ID:
      Hide

      AONE-8699

      Show
      AONE-8699

      Description

      Preconditions:
      1.Version 4.1.10 is installed and up and running.
      2.Version 5.1 is installed.
      3.Both versions are configured to use the same database and alf_data.

      Steps to reproduce:
      1.On version 4.1.10 create a workflow for each type of workflow that are NOT JBPM workflows.(Adhoc Workflow,Group Review And Approve,Parallel Review And Approve,Pooled Review And Approve,Review And Approve,Web Quick Start: Review & Publish Section Structure,Web Quick Start: Review & Publish Web Assets Workflows; )
      2.Stop version 4.1.10 and upgrade to 5.1.
      3.With the user who created the workflows Go to Tasks>Workflows I've Started.
      4.Navigate to Workflow Type filter (from right navigation bar)

      Actual Result:
      3.All the workflows are displayed.
      4.When selecting Review and Approve (group review) or Review and Approve (one or more reviewers) Workflows- no workflow is displayed. (see the attach screenshot NoWfG&Agroup.JPG/NoWfReviewAndAprove.JPG)
      In the list of all the workflows displayed (previous step) there is a workflow for the type Review and Approve (group review) and Review and Approve (one or more reviewers) (see the attach screenshot(Workflows51.JPG)

      Expected Result:
      4.When selecting the workflow type Review and Approve (group review) /Approve (one or more reviewers) a workflow should be displayed.

      Info. When selecting the other workflow types the right workflow is displayed.(e.g. see the screenshot FilterApplied.JPG)
      Issue is reproducing only when upgrading from 4.1.10 to 5.1.

        Attachments

        1. 4-1.log
          140 kB
        2. FilterApplied.JPG
          FilterApplied.JPG
          82 kB
        3. NoWfG&Agroup.JPG
          NoWfG&Agroup.JPG
          65 kB
        4. NoWfReviewAndAprove.JPG
          NoWfReviewAndAprove.JPG
          89 kB
        5. Workflows51.JPG
          Workflows51.JPG
          234 kB

          Issue Links

            Activity

            Hide
            mrogers Mark Rogers [X] (Inactive) added a comment - - edited

            Yes "Hacking" the database table PROC_DEF_ID and TASK_DEF_ID from activitiParallelGroupReview:1:20 to activitiParallelGroupReview:2:717 does fix the problem.

            The problem would therefore seem to be that the screen in share is only showing tasks for the current instance of the process definition. And not picking up tasks of the same name but an old process definition.

            Show
            mrogers Mark Rogers [X] (Inactive) added a comment - - edited Yes "Hacking" the database table PROC_DEF_ID and TASK_DEF_ID from activitiParallelGroupReview:1:20 to activitiParallelGroupReview:2:717 does fix the problem. The problem would therefore seem to be that the screen in share is only showing tasks for the current instance of the process definition. And not picking up tasks of the same name but an old process definition.
            Hide
            mrogers Mark Rogers [X] (Inactive) added a comment - - edited

            WebScript is WorkflowInstanceGet

            /alfresco/s/api/workflow-instances?initiator=admin&exclude=jbpm$wcmwf:*,jbpm$wf:articleapproval,activiti$publishWebContent,jbpm$publishWebContent,jbpm$inwf:invitation-nominated,jbpm$imwf:invitation-moderated,activiti$activitiInvitationModerated,activiti$activitiInvitationNominated,activiti$activitiInvitationNominatedAddDirect&skipCount=0&maxItems=50&definitionName=activiti$activitiParallelGroupReview&alf_ticket=TICKET_da2598fd832837af2dd3fd52bfe4e7e2ba76d0c9

            The following line:
            workflowDefinitionId = workflowService.getDefinitionByName(req.getParameter(PARAM_DEFINITION_NAME)).getId();

            results in activiti$activitiParallelGroupReview:2:717

            Which returns the correct answer of 1.

            So the question is then is this correct?

            Or was that getDefinitonByName wrong. Or should I group all workflow instances of that name together.

            Show
            mrogers Mark Rogers [X] (Inactive) added a comment - - edited WebScript is WorkflowInstanceGet /alfresco/s/api/workflow-instances?initiator=admin&exclude=jbpm$wcmwf:*,jbpm$wf:articleapproval,activiti$publishWebContent,jbpm$publishWebContent,jbpm$inwf:invitation-nominated,jbpm$imwf:invitation-moderated,activiti$activitiInvitationModerated,activiti$activitiInvitationNominated,activiti$activitiInvitationNominatedAddDirect&skipCount=0&maxItems=50&definitionName=activiti$activitiParallelGroupReview&alf_ticket=TICKET_da2598fd832837af2dd3fd52bfe4e7e2ba76d0c9 The following line: workflowDefinitionId = workflowService.getDefinitionByName(req.getParameter(PARAM_DEFINITION_NAME)).getId(); results in activiti$activitiParallelGroupReview:2:717 Which returns the correct answer of 1. So the question is then is this correct? Or was that getDefinitonByName wrong. Or should I group all workflow instances of that name together.
            Hide
            mrogers Mark Rogers [X] (Inactive) added a comment -

            I suspect that line 132 of WorkflowInstanceGet should be calling getAllDefinitionsByName rather than

             workflowDefinitionId = workflowService.getDefinitionByName(req.getParameter(PARAM_DEFINITION_NAME)).getId();
            
            Show
            mrogers Mark Rogers [X] (Inactive) added a comment - I suspect that line 132 of WorkflowInstanceGet should be calling getAllDefinitionsByName rather than workflowDefinitionId = workflowService.getDefinitionByName(req.getParameter(PARAM_DEFINITION_NAME)).getId();
            Hide
            mrogers Mark Rogers [X] (Inactive) added a comment - - edited

            Fix seems to work.

            Bug has been present since first implemented in r38402 release 4.1 ALF-14438. It's merely been exposed by the 4.1 Patch.

            I wonder whether a deeper change is required to WorkflowService to provide the services required for this requirement, but for now this fix should be sufficient.

            Show
            mrogers Mark Rogers [X] (Inactive) added a comment - - edited Fix seems to work. Bug has been present since first implemented in r38402 release 4.1 ALF-14438. It's merely been exposed by the 4.1 Patch. I wonder whether a deeper change is required to WorkflowService to provide the services required for this requirement, but for now this fix should be sufficient.
            Hide
            rsutu Rodica Sutu added a comment -

            Issue didn't reproducing when upgrading from 4.1.10 to 5.1 - Alfresco Enterprise v5.1.0 (r115208-b310) schema 9009.

            Show
            rsutu Rodica Sutu added a comment - Issue didn't reproducing when upgrading from 4.1.10 to 5.1 - Alfresco Enterprise v5.1.0 ( r115208 -b310) schema 9009.

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                rsutu Rodica Sutu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours, 40 minutes
                  1d 3h 40m