AnsweredAssumed Answered

Timer fires in task, task gets duplicated

Question asked by eleaese on Apr 30, 2009
Latest reply on Aug 2, 2013 by florent.souliere
We're facing a problem with timers on advanced workflows definitions. Our Alfresco version is 3.0.0 Stable.

Regarding the problem. When changing workflow state with a timer (please see processdefinition below) the workflow advances to the next activity. But, when the assigne logs into webclient the task remains assigned to him/her. It seems the task remains to be bound in the previous state (even after refreshing the page, even after server restart). Next activity is a task (task-node, task), and activity appears duplicated, with the previous and present state.

Please let me know what we are doing wrong.

Process definition is:

<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="exwf:exUI">
   <swimlane name="initiator"/>

   <start-state name="start">
      <task name="exwf:submitStartTask" swimlane="initiator"/>
      <transition to="notifyAdmisibilityState"></transition>
   </start-state>

   <task-node name="notifyAdmisibilityState">
      <task name="exwf:submitWaitTask" swimlane="initiator" >
         <timer name="thirdPartyTimer" duedate="15 seconds" transition="toSomebody">
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <runas>admin</runas>
               <script>{ logger.log("timer fired"); }</script>      
            </action>
         </timer>
      </task>
      <transition name="toEnd" to="end"/>
      <transition to="anybody" name="toSomebody">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>{logger.log("anybody"); }</script>
         </action>
      </transition>
   </task-node>

   <task-node name="anybody">
      <task name="exwf:submitAnybodyTask" swimlane="initiator"/>
      <transition to="end"></transition>
   </task-node>

   <end-state name="end"></end-state>
</process-definition>

Outcomes