Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-105495 As a Operation Manager, I want to transition a single-task workflow instance while analyzing my process metrics
  3. LPS-110335

[BUG] StaleObjectStateException and SchedulerException thrown when transitioning category-specific-definition workflow process

Details

    • Technical Task
    • Status: Closed
    • Minor
    • Resolution: Completed
    • None
    • Master
    • Workflow
    • None

    Description

      Current issue: StaleObjectStateException and SchedulerException thrown when transitioning category-specific-definition workflow process

      Steps to reproduce:

      1. Create a new workflow process called "New process"
      2. Import the data of category-specific-definition.xml and Update the New process
      3. Associate it to Blogs Entry
      4. Create a blog entry
      5. Go to Control Panel -> Workflow -> Metrics
      6. Click on Pending Items
      7. Assign the latest blog entry created to yourself and approve it

      Actual result: StaleObjectStateException and SchedulerException are thrown and the instance keeps without a task in All Items page

      2020-03-13 13:13:16.726 ERROR [liferay/kaleo_graph_walker-3][ParallelDestination:59] Unable to process message {destinationName=liferay/kaleo_graph_walker, response=null, responseDestinationName=null, responseId=null, payl[email protected]44c77543, values={defaultLocale=en_US, companyId=20097, groupId=0, principalName=20127, [email protected]67f7ae06}}
      com.liferay.portal.kernel.messaging.MessageListenerException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.workflow.kaleo.model.impl.KaleoTimerInstanceTokenImpl#37415]
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.workflow.kaleo.model.impl.KaleoTimerInstanceTokenImpl#37415]
      	at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1950)
      	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2595)
      	at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2495)
      	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2822)
      	at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113)
      	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
      	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      	at com.liferay.portal.dao.orm.hibernate.event.NestableFlushEventListener.onFlush(NestableFlushEventListener.java:61)
      	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
      	at com.liferay.portal.spring.hibernate.PortletTransactionManager$TransactionStatusWrapper.reset(PortletTransactionManager.java:260)
      	at com.liferay.portal.spring.hibernate.PortletTransactionManager.commit(PortletTransactionManager.java:63)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:41)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy599.completeKaleoTimerInstanceTokens(Unknown Source)
      	at com.liferay.portal.workflow.kaleo.runtime.internal.util.ExecutionContextHelperImpl.completeKaleoTimerInstances(ExecutionContextHelperImpl.java:80)
      	at com.liferay.portal.workflow.kaleo.runtime.node.BaseNodeExecutor.exit(BaseNodeExecutor.java:121)
      	at com.liferay.portal.workflow.kaleo.runtime.internal.graph.DefaultGraphWalker.follow(DefaultGraphWalker.java:58)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy991.follow(Unknown Source)
      	at com.liferay.portal.workflow.kaleo.runtime.internal.graph.messaging.PathElementMessageListener.doReceive(PathElementMessageListener.java:56)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	... 5 more
      2020-03-13 13:13:16.803 WARN  [liferay/scheduler_engine-3][ProxyMessageListener:88] com.liferay.portal.kernel.scheduler.SchedulerException: Unable to delete jobs in group destination.workflow_timer/37415
      com.liferay.portal.kernel.scheduler.SchedulerException: Unable to delete jobs in group destination.workflow_timer/37415
      	at com.liferay.portal.scheduler.quartz.internal.QuartzSchedulerEngine.delete(QuartzSchedulerEngine.java:109)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:82)
      	at com.liferay.portal.kernel.messaging.proxy.ProxyMessageListener.receive(ProxyMessageListener.java:58)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.quartz.SchedulerException: Unable to unschedule trigger [destination.workflow_timer/37415.destination.workflow_timer/37415] while deleting job [destination.workflow_timer/37415.destination.workflow_timer/37415]
      	at org.quartz.core.QuartzScheduler.deleteJob(QuartzScheduler.java:948)
      	at org.quartz.impl.StdScheduler.deleteJob(StdScheduler.java:292)
      	at com.liferay.portal.scheduler.quartz.internal.QuartzSchedulerEngine.delete(QuartzSchedulerEngine.java:105)
      	... 11 more
      

      Expected result: The task should be successfully transitioned and the instance completed.

      NOTE: This issue is not seen on My Workflow Tasks.

      Environment:
      master DXP: 9876741a5f9507f609fd1d57003b2cb3d84e4283
      Updated on: Thu Mar 12 22:22:31 2020 -0700

      Attachments

        Activity

          People

            brian.chan Brian Chan
            dennys.barros.1 Dennys Barros.1 (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              2 years, 36 weeks, 5 days ago

              Packages

                Version Package
                Master