Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-98175

MyWorkflowTaskPortlet doesn't show tasks when a KaleoTaskInstanceToken exists in ES but not in DB

    Details

      Description

      When accessing My Workflow Task Portlet with an user with assignedTasks if a task is present in the index, but not in database, no entries are shown.

      If you put "com.liferay.portal.workflow.kaleo.service.impl" to value DEBUG some traces of NoSuchKaleoTaskInstanceToken are shown in method search of KaleoTaskInstanceTokenLocalServiceImpl.

      It seems catch clause should be also inside the loop and warn if an entry doesn't exist instead of going out of the loop and not showing any results neither error.

      Source code

       

      Steps to reproduce:

      Log in as administrator.

      Go to Liferay site -> Configuration -> Workflow.

      Set SingleApprover Workflow to comments.

      Create a new Web Content an make two comment, it has to create 2 entries in "my workflow tasks".

      Go to User Profile -> My Workflow tasks -> Assigned to my roles. The task is being shown.

      Now stop elasticsearch bundles. Going to Control Panel --> Configuration --> GoGo Shell.
      type lb elasticsearch
      stop all those bundles using stop + id

      Delete last comment
      Stop the server.
      Start the server

      Start elasticsearch bundles
      Going to Control Panel --> Configuration --> GoGo Shell.
      type lb elasticsearch
      start all those bundles using start + id

      Expected result:
       
      Go to My Workflow tasks 1 task should appear in "assigned to my roles" tab
      If you execute this query in browser it should appear 2 results:
      http://localhost:9200/liferay-

      {companyId}/_search?q=entryClassName:com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken

      Current result:

      Go to My Workflow tasks no tasks appear in "assigned to my roles" tab

      If you execute this query in browser it should appear 2 results:
      http://localhost:9200/liferay-{companyId}

      /_search?q=entryClassName:com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 1 week, 4 days ago

                Packages

                Version Package
                7.0.0 DXP FP85
                7.0.X
                7.1.10 DXP FP13
                7.1.X
                7.2.10 DXP FP1
                7.2.X
                7.2.1 CE GA2
                Master