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

Kaleo workflow process fails to advance beyond the "created" status in sharded database portal instances

    Details

      Description

      Set up sharding and portal instances
      Deploy Kaleo plugin

      In default instance:
      1. Update Workflow to Single Approver (Version 1) for Blogs Entry, Document Library Document, Web Content, Message Boards Message
      2. Create Blogs, Web Content, Message Boards thread and upload Document Library Document, [Submit for publication]
      3. Go to Control Panel> My Submissions, user sees list of entries in "Review" status
      4. Go to Control Panel> My Workflow Tasks, user sees the same list of entries under "Assigned to My Roles"

      In other instance
      5. Repeat steps 1-2
      6. Go to Control Panel> My Submissions, user sees list of entries in "created" status
      4. Go to Control Panel> My Workflow Tasks, user sees nothing listed under "Assigned to My Roles"

      Results: The issue is that the entries submitted for publication are listed in [My submissions] as "created" and not "Review". The entries are all missing in "Assigned to My Roles". There are no exceptions in the log.
      __________________________________________________________

      When working with multiple instances with database shard enabled, the Kaleo workflow process never advances beyond the status "created" in the additional portal instances. It only behaves well by advancing to "review" status in the default instance.

      For reproduction, check out the portal and kaleo web plugin from trunk, build and deploy. Adjust portal-ext.properties to enable shard as appropriate and test run. I tested with web content, document management, blogs, message board. All "My Submissions" remain in the status "created" in all cases in the additional portal instances.

      As sharding is a very important feature in Liferay, I believe that it is critical to fix this as soon as possible.

      By way of observation, the error log often times contains message like,

      "
      com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portal.workflow.kaleo.NoSuchInstanceTokenException: No KaleoInstanceToken exists with the primary key 13226
      at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:31)
      at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
      at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:63)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:665)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:579)
      at java.lang.Thread.run(Thread.java:680)
      Caused by: com.liferay.portal.workflow.kaleo.NoSuchInstanceTokenException: No KaleoInstanceToken exists with the primary key 13226
      at com.liferay.portal.workflow.kaleo.service.persistence.KaleoInstanceTokenPersistenceImpl.findByPrimaryKey(KaleoInstanceTokenPersistenceImpl.java:402)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      ...
      "
      Strangely, a direct inspection of the database shows that the KaleoInstanceToken with the primary key displayed in the error message exists. There seem to be a kind of lack of thread synchonization.

        Attachments

          Activity

            People

            Assignee:
            jared.zimmerman Jared Zimmerman (Inactive)
            Reporter:
            piosystems@yahoo.co.uk Pius Onobhayedo
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 years, 17 weeks, 3 days ago

                Packages

                Version Package
                6.0.12 EE