It's all about the answers!

Ask a question

How to send out a mail from a participant for all the users of a specific role

Sai Hema (1111) | asked Mar 21 '13, 4:26 a.m.
retagged Mar 21 '13, 4:30 a.m. by Aradhya K (1.4k44345)

I would like to know how can we send out a mail from a participant on a state transition for users of a specific role .
For example: On open -state  I want to send out  mails to some users who belongs to ABC role and when state changes to in -progress I want to send mails to users who belongs to DEF role .

Also,I would like to know where can I best place my role-state mapping ?

Thanks in advance !!

3 answers

permanent link
Aradhya K (1.4k44345) | answered Mar 21 '13, 4:45 a.m.
As this is a Participant you can you Process Configuration XML as a place to get all the configuration data needed for your Participant.

You can use the to send the mail.
You need to check IMailerService#isMailEnabled to check if the mail notification is enabled on the server or not.
The IMailerService#sendMultipartMail or IMailerService#sendMail to send the mail. has some more information on the usage.

permanent link
Ralph Schoon (62.7k33643) | answered Mar 21 '13, 4:53 a.m.
Adding to Aradhya, shows how to analyze users and roles in a participant.

permanent link
Sterling Ferguson-II (1.6k8275268) | answered Mar 21 '13, 8:09 a.m.
If your do not code for a living:


Your answer

Register or to post your answer.