Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-17601

"My completed tasks" error with embedded subprocess

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 5.1.2
    • Fix Version/s: 5.1.4, 5.2.1
    • Component/s: Workflow
    • Labels:
      None
    • Environment:
      Alfresco One 5.1.2

      Description

      Summary
      When using an Activiti process with an embedded subprocess in Alfresco, the "My completed tasks" view shows a red error and the logs display a Nullpointer exception.

      Steps to reproduce
      1. Via Activiti Explorer (http://localhost:8080/alfresco/activiti-admin) select Deployments and upload the attached process simple-workflow.bpmn20.xml
      NOTE: This is a simple demo process containing an embedded subprocess. See also attached process diagram "diagramEmbeddedSubprocess.png"
      2. Log in to Alfresco Share as admin
      3. In the "My Tasks" dashlet select "Start Workflow"
      4. From the workflow dropdown select the "Support demo" workflow and set the Workflow Assignee to "Administrator" and start the workflow
      5. Complete the workflow by completing the task "Alfresco User Task" that is assigned to the admin
      6. From the Share header menu select Tasks->My Tasks
      7. From the filters on the left panel select "Completed"

      Current behaviour

      • Share displays a red error banner "Error loading items" (see attached error.png)
      • The logs contain the following Nullpointer exception:
        2017-03-10 05:02:32,058 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-8] Exception from executeScript: 02100023 Wrapped Exception (with status template): null
        org.springframework.extensions.webscripts.WebScriptException: 02100023 Wrapped Exception (with status template): null
        	at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1138)
        	at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
        ...
        Caused by: java.lang.NullPointerException
        	at org.alfresco.service.cmr.workflow.LazyActivitiWorkflowTask.<init>(LazyActivitiWorkflowTask.java:98)
        	at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.getAssignedTasks(ActivitiWorkflowEngine.java:1543)
        	at org.alfresco.repo.workflow.WorkflowServiceImpl.getAssignedTasks(WorkflowServiceImpl.java:843)
        	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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        	at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:41)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        	at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        	at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
        	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
        	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        	at com.sun.proxy.$Proxy180.getAssignedTasks(Unknown Source)
        	at org.alfresco.repo.web.scripts.workflow.TaskInstancesGet.buildModel(TaskInstancesGet.java:137)
        	at org.alfresco.repo.web.scripts.workflow.AbstractWorkflowWebscript.executeImpl(AbstractWorkflowWebscript.java:88)
        	at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
        	... 33 more
        

      Expected behaviour
      As the process is following BPMN standard and the workflow itself is running and completing fine, the "Completed" filter should show completed workflows without any errors.

      Supporting evidence

      • Reproduced with Alfresco One 5.1.2 and also with ACS 5.2
      • Workaround: DonĀ“t use an embedded subprocess but design the process without them.

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs
                  Reporter:
                  dkoch Dennis Koch
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day, 6 hours, 30 minutes
                    1d 6h 30m

                      Structure Helper Panel