cancel
Showing results for 
Search instead for 
Did you mean: 

Send mail to all users of a pooled task

chicco0386
Champ on-the-rise
Champ on-the-rise
Hi all,
I'm trying the right way for send an email notification to all users assigned to a pooled task.
I've read inside the forum and the most used way is use a ForEachFork action, my code is this:
<node name="Invia mail a marketing">
      <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
            <foreach>#{tria_marketing}</foreach>
            <var>currentMarketingUser</var>
       </action>
      <transition to="Revisione marketing">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                 <script>
                    var mail = actions.create("mail");
                    mail.parameters.to = currentMarketingUser.properties.email;
                    mail.parameters.subject = "Test Document Task " + bpm_workflowDescription;
                    mail.parameters.text = "PPROVA";
                    mail.execute(bpm_package);
                 </script>
            </action>
      </transition>
   </node>
<task-node name="Revisione marketing">
      <task name="wfTria:revisioneMarketing" swimlane="marketing"></task>
      <transition to="Richiedi nuovamente qualifica PM" name="Richiedi nuovamente qualifica PM"></transition>
      <transition to="Approvazione direzione commerciale o marketing" name="Revisionato"></transition>
   </task-node>

With this code the mails are send to all users inside the pool, but the next task inside the code is create N (N=number of pooled users) time for each users. This is not correct.

Can you help me and say where I do the mistake?
Thanks
2 REPLIES 2

roseta
Champ in-the-making
Champ in-the-making
Hi chicco,

Did you finnally solve this? I have the same problem and would appreciate some help! Thanks! 😃

chicco0386
Champ on-the-rise
Champ on-the-rise
Hi chicco,

Did you finnally solve this? I have the same problem and would appreciate some help! Thanks! 😃

Hi roseta,
I don't have find a solution for this…sorry. I'm waiting a response from the community.

Can anyone help us?
THANKS