cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Email Notification to multiple Users in BPM

sweetysingh
Participant
0 Kudos

Hi Experts,

I am using SAP NetWeaver 7.2 SP05 PAT0005, and wanted to create a process which send automatic Email notification to multiple EmailIds.

I had gone through so many documents but could not help. Please suggest how to do step by step as I am new to BPM.
Thanks in advance.

Regards,

Sweety.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are these external emails? or, emails for internal ume or LDAP users?


if the emails are for internal users, you can use the function "getPrincipals(string[1..*] principalId)" , it takes array of principal ids, and will send the notification to the list of users.

please note that the format of the principal id for users imported from active directory is

USER.CORP_LDAP.logonid

the format for the principal id for ume users:

USER.PRIVATE_DATASOURCE.un:logonid

regards,

Ahmed

sweetysingh
Participant
0 Kudos

Hi,

We are using external email Ids, which is comming from web dynpro 0..n context node.

The context node is in task output of human activity.

Regards,

Sweety.

Former Member
0 Kudos

my friend, for external emails you will need to write an ejb to do the job.

please follow the steps in this document, that should solve your issue.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10057e20-2ca2-2d10-1b91-a1b9a8c8e...

Regards,

Ahmed

sweetysingh
Participant
0 Kudos

Hi Ahmed,

Sorry.. we are using multiple internal email ids. And those Email IDs are not from UME database, they are from ABAP database

Please suggest how to do in this case..

Thanks,

Sweety.

junwu
Active Contributor
0 Kudos

no matter where they are from, you only have mail id, sap bpm cannot help, you have to write code.

sweetysingh
Participant
0 Kudos

Hi All,

I am totally confused how to do and it urgent for my project.

I have attached my requirement, please find and suggest in details as I am new to BPM.

Thanks in advance.

Regards,

Sweety.

Former Member
0 Kudos

for this scenario you will have to follow the below procedure to implement this functionality. please let me know if you faced any issue while implementing this.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10057e20-2ca2-2d10-1b91-a1b9a8c8e...

junwu
Active Contributor
0 Kudos

just follow the link provided by Ahmed.

sweetysingh
Participant
0 Kudos

Hi Ahmed/Jun,

Thanks for your reply..

I want to know how I will pass Email Ids in EJB from WD screen.

Regards,

Sweety.

junwu
Active Contributor
0 Kudos

everything is in that doc, just follow

sweetysingh
Participant
0 Kudos

Hi,

I am following the PDF, have a doubt in the last screen shot.

In PDF for Use an expression for External Users:

GetExternalUsers(EmailAdresses/emailAddress,locale,timezone)

So I want to know from where 1st parameter (EmailAdresses/emailAddress) is comming?

Do I need to create context or what it is...

And also in WD Java I need to call this ejb to fill EMail IDs or it gets call automatically.

Regards,

Sweety.

Former Member
0 Kudos

Dear Sweety,

yes, the EmailAdresses/emailAddress should be defined in your process context to hold the email list you want to send the notification to.

the value to this email list in the process context should be mapped out to the process context from your WD interface controller of the human activity task.

regards,

Ahmed

sweetysingh
Participant
0 Kudos

Dear Ahmed,

Thank you so much for your help..


I have followed all steps mentioned in PDF.

-> Created context in BPM of string type 0..n

-> Mapped from the WD interface controller(Created node of 0..n of String type) of the human activity.

-> Written EJB code.

-> Created EJB Function

-> tried adding expression as mentioned in PDF but got error like locale and timezone not found

-> So I changed locale to "English" and timezone to "Coordinated Universal Time".

Now while adding the EJB Function to the Use Expression of the external User, getting error like Invalid function name.

Please suggest where I am wrong.

Please please please help as its getting late in my project and I am new to BPM...

Regards,

Sweety.

junwu
Active Contributor
0 Kudos

you can ignore the error and proceed to the test.

sweetysingh
Participant
0 Kudos

Hello Jun,

Workflow task got suspended in EmailNotification activity.

Here is mapping screen shot

Please let me know is it correct mapping....

Please suggest why its getting suspended.

Thanks,

Sweety.

junwu
Active Contributor
0 Kudos

find error log

sweetysingh
Participant
0 Kudos

Hi Jun/Ahmed,

Thank you so much for your help....

Its working now, Problem was there in JNDI name.

I corrected JNDI name and then it worked

Thanks again...

Regards,

Sweety.

Answers (2)

Answers (2)

ROHITGERA1
Participant
0 Kudos

Hi,

you can use the Notification activity in youy BPM Process , and then in Property of Notification activity you can set the E-mail Id for sending Notification.

junwu
Active Contributor
0 Kudos

are you talking about those hardcoded mail id? in most case it is pretty much useless

ROHITGERA1
Participant
0 Kudos

yes , we can add hardcoded e-mail id or we can also use UME users o rexpression to send the Notification.

former_member191643
Active Contributor
0 Kudos

Sending mails to external email addresses through a notification activity in BPM does not work most of the times. Works well only with UME users. Moreover, they are dynamic, coming from the WD. So hard-coding static values won't help either.

junwu
Active Contributor
0 Kudos

how you get the email ids, are they static?

if not, you have to write java code to do the job, bpm is not able to cover that.

sweetysingh
Participant
0 Kudos

Hi Jun,

Thanks for reply...

Those emailIds are dynamic, and comming from WD screen.

I went through this doc: http://scn.sap.com/docs/DOC-45153

But not able to understand 3rd step. Please help..

Thanks,

Sweety.

junwu
Active Contributor
0 Kudos

you have email id or user id?

sweetysingh
Participant
0 Kudos

Hi,

We have Email IDs comming from WD context node.

I have doubt on mapping notification activity in to field.

Please find attached screenshot.

Regards,

Sweety.

junwu
Active Contributor
0 Kudos

as i said, you only have email id, then you have to write ejb java code to do the job. standard notification step won't help