AnsweredAssumed Answered

Timers in advanced workflow

Question asked by stickman on Sep 24, 2008
Latest reply on Nov 6, 2008 by olyerickson
I'm having some issues trying to get timers working in an advanced workflow I'm working on.


   <task-node name="approved">
   <task name="wf:approvedParallelTask" swimlane="initiator">
       <timer duedate="1 minutes" repeat="1 minutes" transition="to_langreview">
       <action name="sendmailandgo" class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
          <script>
          {
            var mail = actions.create("mail");         
            mail.parameters.from = "alfresco@mserver.com;
            mail.parameters.subject = "New Document Added";
            mail.parameters.text = "There is a new document in Alfresco";
            mail.parameters.to = initiator.properties["cm:email"];
            mail.execute(bpm_package);
            logger.log("Sending mail");
            }
          </script>
       </action>
    </timer>
   </task>
      <transition name="to_langreview" to="langreview">
          <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
            var mail = actions.create("mail");         
            mail.parameters.from = initiator.properties["cm:email"];
            mail.parameters.subject = "New document added";
            mail.parameters.text = "There is a new document in Alfresco";
            mail.parameters.to = langreviewer.properties["cm:email"];
            mail.execute(bpm_package);
            logger.log("Sending");
            </script>
            </action>
      </transition>
   </task-node>

I need the task to transition to the next task once the timer is done, but it doesn't work.

In fact, nothing works, it won't send an email even if I remove the "transition=to_langreview".

BTW, this is Alfresco 3.0a and I couldn't find anything in the Issues DB about it.

Outcomes