PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-33188

Forking and Joining a workflow sometimes leaves out a review action, throws ConcurrentModificationException

    Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      5
    • Fix Priority:
      4
    • Similar Issues:
      Show 5 results 

      Description

      This issue is hard to reproduce reliably. Although reproduction steps are given, it is unlikely that you will be able to reproduce it all the time.

      Reproduction Steps:

      1 - Start Liferay
      2 - Deploy Kaleo Web
      3 - Create a new workflow definition which contains a fork state with 3 target task
      4 - Go to Workflow Configuration, and set the Web Content to the newly created workflow
      5 - Add several web contents for publication
      6 - Keep doing #6. To properly reproduce it you will have to do either of the following, and even then it won't always work:

      • Use a portlet that adds the content superfast
      • Ask someone to submit an asset at the same time as you are submitting it.
        7 - If lucky, you'll get the exception.

      Exception:

      11:04:41,834 ERROR [ParallelDestination:111] Unable to process message {destinationName=liferay/kaleo_graph_walker, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.portal.workflow.kaleo.runtime.graph.PathElement@2ba2bf87, values={principalPassword=null, principalName=10196, companyId=10154}}
      com.liferay.portal.kernel.messaging.MessageListenerException: java.util.ConcurrentModificationException
              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:108)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: java.util.ConcurrentModificationException
              at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
              at java.util.HashMap$EntryIterator.next(HashMap.java:834)
              at java.util.HashMap$EntryIterator.next(HashMap.java:832)
              at org.jabsorb.serializer.impl.MapSerializer.marshall(MapSerializer.java:118)
              at org.jabsorb.JSONSerializer.marshall(JSONSerializer.java:390)
              at org.jabsorb.JSONSerializer.toJSON(JSONSerializer.java:528)
              at com.liferay.portal.json.JSONFactoryImpl.serialize(JSONFactoryImpl.java:221)
              at com.liferay.portal.kernel.json.JSONFactoryUtil.serialize(JSONFactoryUtil.java:123)
              at com.liferay.portal.workflow.kaleo.util.WorkflowContextUtil.convert(WorkflowContextUtil.java:36)
              at com.liferay.portal.workflow.kaleo.service.impl.KaleoLogLocalServiceImpl.addTaskAssignmentKaleoLog(KaleoLogLocalServiceImpl.java:185)
              at sun.reflect.GeneratedMethodAccessor890.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
              at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
              at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
              at $Proxy411.addTaskAssignmentKaleoLog(Unknown Source)
              at com.liferay.portal.workflow.kaleo.runtime.node.TaskNodeExecutor.doEnter(TaskNodeExecutor.java:165)
              at com.liferay.portal.workflow.kaleo.runtime.node.BaseNodeExecutor.enter(BaseNodeExecutor.java:49)
              at com.liferay.portal.workflow.kaleo.runtime.graph.DefaultGraphWalker.follow(DefaultGraphWalker.java:62)
              at sun.reflect.GeneratedMethodAccessor805.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
              at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
              at $Proxy438.follow(Unknown Source)
              at com.liferay.portal.workflow.kaleo.runtime.graph.messaging.PathElementMessageListener.doReceive(PathElementMessageListener.java:54)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
              ... 5 more
      

        Activity

        Hide
        Michael Han added a comment -

        The original fix is not correct. it doesn't solve the root problem.

        Show
        Michael Han added a comment - The original fix is not correct. it doesn't solve the root problem.
        Hide
        Ginson Ren added a comment -

        PASSED Manual Testing using the following steps:

        1. Deploy DataManipulator and Kaleo.
        2. Add three roles "review1"/"review2"/"review3".
        3. Go to Control Panel > Workflow, create a new workflow definition which contains a fork state with 3 target task.
        4. Go to Workflow Configuration, and set the Web Content to the newly created workflow.
        5. Go to Data Manipulator (Content), generated 100 articles.

        Reproduced on:
        Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2.

        The console will throw the exception.

        Fixed on:
        Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: ba2892acfcd7c99518fbd789014853b6b5f108bc.
        Portal 6.1.x EE GIT ID: 339e587371bc199255cf2e289b88893e9c8043a7.
        Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: b6cc2d5562f6d7e1dc4d7dc446b168935105df70.
        Portal 6.2.x EE GIT ID: 6663b57e7081179070196cdfa9aed7afb123c4dd.

        There is no exception and the articles are created correctly.

        Show
        Ginson Ren added a comment - PASSED Manual Testing using the following steps: 1. Deploy DataManipulator and Kaleo. 2. Add three roles "review1"/"review2"/"review3". 3. Go to Control Panel > Workflow, create a new workflow definition which contains a fork state with 3 target task. 4. Go to Workflow Configuration, and set the Web Content to the newly created workflow. 5. Go to Data Manipulator (Content), generated 100 articles. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2. The console will throw the exception. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: ba2892acfcd7c99518fbd789014853b6b5f108bc. Portal 6.1.x EE GIT ID: 339e587371bc199255cf2e289b88893e9c8043a7. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: b6cc2d5562f6d7e1dc4d7dc446b168935105df70. Portal 6.2.x EE GIT ID: 6663b57e7081179070196cdfa9aed7afb123c4dd. There is no exception and the articles are created correctly.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 14 weeks, 6 days ago

              Development

                Structure Helper Panel