AnsweredAssumed Answered

Calling workflow assignee's e-mail in Javascript

Question asked by hanoul on Jul 28, 2009
Latest reply on Oct 5, 2010 by tejaskanani292004
I have added e-mail notification to my Web Site Submission workflow (Enterprise version 3.1).
At the moment, I have the recipient's e-mail address hard coded in my script. However, I would like to have the e-mail sent to the next 'assignee' in a serial review. How can I call the next serial reviewer's (assignee) e-mail address in Javascript?

My code at present is the following, and is placed inside the 'submitserialreview' decision node inside <configRoot>/alfresco/workflow/submit-processdefinition.xml:

    <decision name="submitserialreview">
       <transition name="endreview" to="endreview" />
       <transition name="review" to="serialreview">
         <condition>#{wcmwf_approveCnt &lt; wcmwf_reviewerCnt}</condition>
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               var mail = actions.create("mail");
      = "";
               mail.parameters.subject = "New Alfresco workflow submission: " + wcmwf_label + " by " +;
               mail.parameters.from =["cm:email"];
               mail.parameters.text = + " " + + " has submitted the following content for your approval";