cancel
Showing results for 
Search instead for 
Did you mean: 

Timers in advanced workflow

stickman
Champ in-the-making
Champ in-the-making
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.
2 REPLIES 2

stickman
Champ in-the-making
Champ in-the-making
Any ideas on this?

olyerickson
Champ in-the-making
Champ in-the-making
We've been having similar trouble with transitions on timers. bucklao allegely did this but without embedding the transition; see

http://forums.alfresco.com/en/viewtopic.php?f=34&t=13302#p44494