AnsweredAssumed Answered

email sent multiple times??

Question asked by lucille.arkenstone on Apr 5, 2011
Latest reply on Apr 6, 2011 by vinaxwater
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>   

Outcomes