cancel
Showing results for 
Search instead for 
Did you mean: 

group mail notification

midoscofield
Champ in-the-making
Champ in-the-making
Hello,

I wanted to mail-notify a list of the group  just after the end of a task.
Is it possible for me to see the code for the button box "mail notification" that is associated with the variable "bpm sendEMailNotifications", so I can just insert the intended user groups.
Unless,is it feasible to insert a script that sends email through all the members of the different groups and sends an email to each of them

Thank you in advance
5 REPLIES 5

mitpatoliya
Star Collaborator
Star Collaborator
You can surly do it via script.
Which workflow engine you are using JBPM or Activi?
If it is your custom advance workflow you can insert the script which will be invoked during last transition.

something like this in activiti


ecmarchitect.com
<extensionElements>
<activiti:executionListener event=
"start"
class=
"org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"
>
<activiti:field name=
"script"
>
<activiti:string>
logger.log("Hello, World, from transition to User Task B!");
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
</sequenceFlow>

Thanks for your reply,
I use the Activiti engine.But my problem is how can i send an email to all persons for all groups.i have juste find how to send for one person

Hi,

Iterate through the group sending a mail to each one. Like:

<blockcode>
for each(person in emailGroup)
{
  //mail action
  mail.parameters.to = person.properties.email; //this line gets each person in the group
  //then add logic to send mail
}
</blockcode>

This has to be in a script.

Hope this help you.

Regards
DarkRedd

thanks Dark fo this reply, but i would like to know the meaning of the variable "emailGroup"?is it GROUP_mygroup ?

naman
Champ in-the-making
Champ in-the-making
Though this is really very late but thought it will help future visitors.

you can use:
<strong>mail.parameters.to_many = "GROUP_My Group";</strong>