Details

    • Type: Technical Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects Version/s: None
    • Fix Version/s: Master
    • Component/s: Workflow
    • Labels:
      None

      Description

      Current issue: StaleObjectStateException thrown when transitioning versioned workflow processes via Metrics

      Steps to reproduce:

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

      Actual result: StaleObjectStateException is thrown and the instance keeps without task in All Items page

      2020-02-17 19:08:19.974 ERROR [liferay/kaleo_graph_walker-12][ParallelDestination:59] Unable to process message {destinationName=liferay/kaleo_graph_walker, response=null, responseDestinationName=null, responseId=null, payl[email protected]17c113c0, values={defaultLocale=en_US, companyId=20097, groupId=0, principalName=20127, [email protected]66a4e02f}}
      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#39332]
      	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#39332]
      	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.$Proxy582.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.GeneratedMethodAccessor773.invoke(Unknown Source)
      	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.$Proxy760.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
      

      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: 9e14671a96466cacd58b5f016a4bb070f6e7a4f3
      Updated on: Fri Feb 14 10:18:37 2020 -0800

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            dennys.barros.1 Dennys Barros.1 (Inactive)
            Recent user:
            Dennys Barros.1 (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 16 weeks, 5 days ago

                Packages

                Version Package
                Master