cancel
Showing results for 
Search instead for 
Did you mean: 

email sent multiple times??

lucille_arkenst
Champ in-the-making
Champ in-the-making
Dear Friends,

I modified parallelreview_processdefinition.xml.  When someone starts the workflow, they select (3) people.  They tell me, each person gets (3) copies of the email…  If (4) people are chosen, they each get (4) emails.  Can anyone see what is wrong??

TIA  :wink:


    <node name="startreview">
        <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
            <foreach>#{bpm_assignees}</foreach>
            <var>reviewer</var>
        </action>
        <transition name="review" to="Committee Review">
      <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
        <script>
      <!– THIS IS WHERE IT IS BEING SENT MULTIPLE TIMES… WHY? –>
var reviewers = [];
var mail = actions.create("mail");
var theChild = bpm_package.children[0];

for (var i = 0; i &lt; bpm_assignees.size(); i++) {
    reviewers.push(bpm_assignees.get(i).properties["cm:userName"]);
}
mail.parameters.to_many = reviewers;
mail.parameters.subject = "Test";
mail.parameters.from = "alfresco@alfresco.com";
mail.parameters.text = "Test;
        </script>
      </action>      
      </transition>
    </node>   
2 REPLIES 2

lucille_arkenst
Champ in-the-making
Champ in-the-making
And, did I mention… help!!!!   :wink:

vinaxwater
Champ in-the-making
Champ in-the-making
Dear friend,
You can put code send mail in <task-node name=""></task-node> for not send multiple times.

Goodluck.