Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Unprioritized
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0.2
    • Component/s: Workflow
    • Labels:
      None

      Description

      Steps to recreate:

      1. Start an ad hoc workflow on a document and assign it to someone.
      2. Log in as that someone and complete the task.
      3. Use the Explorer Workflow Console to "show workflows all" to grab the workflow ID and save it off somewhere.
      4. Log in as the person who started the workflow and complete the notification task. This ends the workflow.
      5. If you log in to the Explorer workflow console and do a "show workflows all" the workflow will not appear.
      6. Via the workflow service, you can still grab a handle to the workflow:

      wf = workflow.getInstance("activiti$101");
      if (wf == null)

      { print("is null"); }

      else

      { print("Active:" + wf.isActive()); print("Id:" + wf.getId()); print("Desc:" + wf.getDescription()); }

      7. If you now try to delete the workflow (and note you have to use this syntax to work around the reserved word problem), you'll get an error:

      wf['delete']();

      Here is the relevant stack trace:

      Caused by: org.alfresco.service.cmr.workflow.WorkflowException: 01280364 Failed to delete unexisting workflow instance

      {0}

      .
      at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.deleteWorkflow(ActivitiWorkflowEngine.java:271)
      at org.alfresco.repo.workflow.WorkflowServiceImpl.deleteWorkflow(WorkflowServiceImpl.java:575)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      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:309)
      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:34)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy71.deleteWorkflow(Unknown Source)
      at org.alfresco.repo.workflow.jscript.JscriptWorkflowInstance.delete(JscriptWorkflowInstance.java:191)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
      at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
      at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394)
      at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
      at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2234)
      at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:257)
      at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127)
      at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394)
      at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
      at org.mozilla.javascript.ScriptRuntime.evalSpecial(ScriptRuntime.java:2280)
      at org.mozilla.javascript.ScriptRuntime.callSpecial(ScriptRuntime.java:2143)
      at org.mozilla.javascript.optimizer.OptRuntime.callSpecial(OptRuntime.java:165)
      at org.mozilla.javascript.gen.c22._c0(jar:file:/opt/apache/tomcat/apache-tomcat-6.0.32/shared/lib/javascript-console.jar!/alfresco/templates/webscripts/de/fme/jsconsole/execute.post.js:256)
      at org.mozilla.javascript.gen.c22.call(jar:file:/opt/apache/tomcat/apache-tomcat-6.0.32/shared/lib/javascript-console.jar!/alfresco/templates/webscripts/de/fme/jsconsole/execute.post.js)
      at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
      at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
      at org.mozilla.javascript.gen.c22.call(jar:file:/opt/apache/tomcat/apache-tomcat-6.0.32/shared/lib/javascript-console.jar!/alfresco/templates/webscripts/de/fme/jsconsole/execute.post.js)
      at org.mozilla.javascript.gen.c22.exec(jar:file:/opt/apache/tomcat/apache-tomcat-6.0.32/shared/lib/javascript-console.jar!/alfresco/templates/webscripts/de/fme/jsconsole/execute.post.js)
      at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:483)
      at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:191)

        Activity

        jpotts Jeff Potts [X] (Inactive) created issue -
        Hide
        jpotts Jeff Potts [X] (Inactive) added a comment -

        Confirmed that this is also the case on Alfresco Enterprise 4.0.0.

        Show
        jpotts Jeff Potts [X] (Inactive) added a comment - Confirmed that this is also the case on Alfresco Enterprise 4.0.0.
        nburch Nick Burch made changes -
        Field Original Value New Value
        Assignee Services Team Unassigned [ svcteam ] Frederik Heremans [ fheremans ]
        Hide
        fheremans Frederik Heremans [X] (Inactive) added a comment -

        The Explorer workflow-console is a 1-to-1 mapping of the Workflow API. The method called when using "delete activiti$12345" is "public WorkflowInstance deleteWorkflow(String workflowId);" on org.alfresco.repo.workflow.WorkflowComponent. At the time of implementing, the goal was to comply with the existing API and behavior.

        Javadoc for this method states: " Delete an "in-flight" Workflow instance" -> We interpreted a completed workflow as being "no longer in flight". To be concrete, a process "delete" call on a running process is the same as "canceling" a process, only the state "cancelled" and "deleted" in the end-process-listeners are different.

        Calling delete on a completed workflow indeed doesn't work. This can be implemented, but there should be clarity about the javadoc's stating "in flight" instances.

        Show
        fheremans Frederik Heremans [X] (Inactive) added a comment - The Explorer workflow-console is a 1-to-1 mapping of the Workflow API. The method called when using "delete activiti$12345" is "public WorkflowInstance deleteWorkflow(String workflowId);" on org.alfresco.repo.workflow.WorkflowComponent. At the time of implementing, the goal was to comply with the existing API and behavior. Javadoc for this method states: " Delete an "in-flight" Workflow instance" -> We interpreted a completed workflow as being "no longer in flight". To be concrete, a process "delete" call on a running process is the same as "canceling" a process, only the state "cancelled" and "deleted" in the end-process-listeners are different. Calling delete on a completed workflow indeed doesn't work. This can be implemented, but there should be clarity about the javadoc's stating "in flight" instances.
        fheremans Frederik Heremans [X] (Inactive) made changes -
        Status New [ 10001 ] Open [ 1 ]
        Hide
        fheremans Frederik Heremans [X] (Inactive) added a comment -

        Deleting completed workflow is now possible due to fix for ALF-13474 (checked in on HEAD and will be available in next 4.0.X release)

        Show
        fheremans Frederik Heremans [X] (Inactive) added a comment - Deleting completed workflow is now possible due to fix for ALF-13474 (checked in on HEAD and will be available in next 4.0.X release)
        fheremans Frederik Heremans [X] (Inactive) made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Frederik Heremans [ fheremans ] QA Backlog Unassigned [ qabacklog ]
        Fix Version/s 4.0.2 [ 11322 ]
        Resolution Fixed [ 1 ]
        rmanthena Ravi Manthena made changes -
        Assignee QA Backlog Unassigned [ qabacklog ] Alfresco QA Team [ alfrescoqa ]
        Hide
        alfrescoqa Alfresco QA Team added a comment -

        Validated against Alfresco Enterprise v4.0.2(b911) Tomcat, Java, PostgreSQL (all installer deployed). Windows 7 SP1 x64, FireFox 12.0

        RomanCh

        Show
        alfrescoqa Alfresco QA Team added a comment - Validated against Alfresco Enterprise v4.0.2(b911) Tomcat, Java, PostgreSQL (all installer deployed). Windows 7 SP1 x64, FireFox 12.0 RomanCh
        alfrescoqa Alfresco QA Team made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Alfresco QA Team [ alfrescoqa ] Closed Issues [ closedissues ]
        adavis Alan Davis made changes -
        Status Closed [ 6 ] Editable Closed [ 10061 ]
        adavis Alan Davis made changes -
        Assignee Closed Issues [ closedissues ] Closed Bugs [ closedbugs ]
        adavis Alan Davis made changes -
        Project Alfresco [ 10281 ] Service Packs and Hot Fixes [ 11350 ]
        Key ALF-13113 MNT-5534
        Workflow Alfjira_II_PM [ 140117 ] Service Packs and Hot Fixes [ 177328 ]
        Fix Version/s 4.0.2 [ 12750 ]
        Fix Version/s 4.0.2 [ 11322 ]
        Status Transition Date 23/May/12 12:48 PM [ 2012-05-23T12:48+0100 ]
        Affects Version/s 4.0 [ 12748 ]
        Affects Version/s 4.0.d Community [ 11311 ]
        Rank (Obsolete) 37090000000
        Component/s Workflow [ 12267 ]
        Component/s Workflow [ 10602 ]
        adavis Alan Davis made changes -
        Status Editable Closed [ 10061 ] Closed [ 6 ]
        adavis Alan Davis made changes -
        Workflow Service Packs and Hot Fixes [ 177328 ] Service Packs and Hot Fixes - rm EC [ 184648 ]
        adavis Alan Davis made changes -
        Workflow Service Packs and Hot Fixes - rm EC [ 184648 ] Service Packs and Hot Fixes [ 191939 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        New New Open Open
        61d 20h 56m 1 Frederik Heremans [X] (Inactive) 30-Apr-12 02:22 PM
        Open Open Resolved Resolved
        18s 1 Frederik Heremans [X] (Inactive) 30-Apr-12 02:23 PM
        Resolved Resolved Closed Closed
        22d 22h 25m 1 Alfresco QA Team 23-May-12 12:48 PM
        Closed Closed Removed Status Removed Status
        299d 4h 50m 1 Alan Davis 18-Mar-13 04:38 PM
        Removed Status Removed Status Closed Closed
        19h 25m 1 Alan Davis 19-Mar-13 12:04 PM

          People

          • Assignee:
            closedbugs Closed Bugs
            Reporter:
            jpotts Jeff Potts [X] (Inactive)
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: