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

CLONE - Unable to retrieve completed workflow's tasks using workflowService.queryTasks() with processProperties

    Details

      Description

      Description:

      Using the workflowService.queryTasks method(http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/workflow/WorkflowService.html#queryTasks%28org.alfresco.service.cmr.workflow.WorkflowTaskQuery,%20boolean%29) if you attempt to get tasks from a completed workflow that has custom process properties( taskQuery.setProcessCustomProps) you will get an exception

      Steps to reproduce:

      • Create an alfresco 4.1.6 environment
      • Once it starts up login to alfresco explorer as admin
      • Create three new users (http://docs.alfresco.com/4.1/topic/com.alfresco.enterprise.doc/tasks/tuh-user-create.html)
      • create/upload a document and take note of the uuid (this will be needed for the provided webscript)
      • Start an advanced workflow (View Document's properties>Start Advanced Workflow>┬áParallel Review And Approve) and assign all three users created previously as the reviewers
      • Login as the first user in alfresco share, in the My Tasks dashlet there should be a "Review Task", click on it and hit approve
      • Login as the second user in alfresco share, in the My Tasks dashlet there should be a "Review Task", click on it and hit reject
      • Login as the third user in alfresco share, in the My Tasks dashlet there should be a "Review Task", click on it and hit approve
      • Back in alfresco explorer login with admin and Make sure the workflow completes its run by approving the remaining task
        -Click on "My Alfresco" to display the admin's dashboard, configure the dashboard by clicking "configure", Select single column and hit "next", Make sure under the selected components are only "My Tasks to Do" and "My Completed Tasks", click finish. Under My Tasks to do click on a task's "mangage task" button and click "Taks Done" this completes a task.
      • Stop alfresco and deploy the provided webscript

      NOTE: To deploy the provided project first untar the file synopsysWorkflowIssue.tar and deploy the contents of the myproj/resources/extension/ folder into $TOMCAT_HOME/shared/classes/alfresco/extension and copy the file myproj/bin/synopsys.jar into $TOMCAT_HOME/webapps/alfresco/WEB-INF/lib

      8) Restart the server and test the webscript with the following url

      http://<ALFRESCO_SERVER>:<ALFRESCO_PORT>/alfresco/service/demo/simple?includeName=no&includeProps=yes&taskName=reviewTask&customTaskProp=reviewerCount&customTaskPropVal=3&qnameIndex=workflow&docUUID=<UUID_OF_UPLOADED/CREATED_DOCUMENT>

      This will return an error.

      Expected Beaviour:

      Workflow service queryTask returns one task found which contains the process property reviewerCount=3.

      Observed Behaviour:

      Workflow service queryTask throws an error:

      --------------
      org.activiti.engine.ActivitiException - execution 2201 doesn't exist

      org.activiti.engine.impl.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:51)
      org.activiti.engine.impl.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:28)
      org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
      org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
      org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
      org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
      org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
      org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      org.activiti.engine.impl.RuntimeServiceImpl.getVariables(RuntimeServiceImpl.java:81)
      org.alfresco.repo.workflow.activiti.ActivitiUtil.getExecutionVariables(ActivitiUtil.java:129)
      org.alfresco.repo.workflow.activiti.properties.ActivitiPropertyConverter.getPathProperties(ActivitiPropertyConverter.java:159)
      org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.getPathProperties(ActivitiWorkflowEngine.java:589)
      org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.isStartTaskMatching(ActivitiWorkflowEngine.java:1982)
      org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.queryStartTasks(ActivitiWorkflowEngine.java:1949)
      org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.queryTasks(ActivitiWorkflowEngine.java:1601)
      org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.queryTasks(ActivitiWorkflowEngine.java:1582)
      org.alfresco.repo.workflow.WorkflowServiceImpl.queryTasks(WorkflowServiceImpl.java:903)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      org.alfresco.service.cmr.workflow.WorkflowPermissionInterceptor.invoke(WorkflowPermissionInterceptor.java:53)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:161)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      $Proxy73.queryTasks(Unknown Source)
      com.someco.alfresco.webscripts.WorkflowServiceTester.execute(WorkflowServiceTester.java:109)
      org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:421)
      org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:449)
      org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:483)
      org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:521)
      org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:333)
      org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)
      org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
      org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
      org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
      org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
      java.lang.Thread.run(Thread.java:662)
      --------------

      Environment Reproduction:

      Alfresco 4.1.6 & 4.1.7. Note that the customer is in 4.1.6 but this issue is also present in 4.1.7

      Analysis to date:

      This only happens when completed workflows are used.

        Attachments

          Structure

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs (Inactive)
                Reporter:
                j.portillo Jose Portillo (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Structure Helper Panel