enabling email notifications in sap netweaver bpm ce 7.1 ehp1

12
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1 Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1 Applies to: SAP NetWeaver Composition Environment 7.1 EHP1 For more information visit Composition Home Page Summary This article explains how to enable email notifications in Business Process Management. We will see the configurations required to be done in NetWeaver administrator or Config Tool to send mail notifications to the users assigned to BPM Process Task. Author: Gayathri Kavi Company: HCL Technologies Ltd. Created on: 22 September 2009 Author Bio Gayathri Kavi is working as a Java Developer in HCL Technologies Ltd, Chennai on SAP NetWeaver (Web Dynpro Java, Composite Application Framework, Guided Procedures and Business Process Management).

Upload: hclsams

Post on 15-Dec-2015

39 views

Category:

Documents


4 download

DESCRIPTION

Enabling EMail Notifications in SAP Netweaver BPM CE 7.1 Ehp1

TRANSCRIPT

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 1

Enabling eMail Notifications in SAP

NetWeaver BPM CE 7.1 Ehp1

Applies to:

SAP NetWeaver Composition Environment 7.1 EHP1

For more information visit Composition Home Page

Summary

This article explains how to enable email notifications in Business Process Management. We will see the configurations required to be done in NetWeaver administrator or Config Tool to send mail notifications to the users assigned to BPM Process Task.

Author: Gayathri Kavi

Company: HCL Technologies Ltd.

Created on: 22 September 2009

Author Bio

Gayathri Kavi is working as a Java Developer in HCL Technologies Ltd, Chennai on SAP NetWeaver (Web Dynpro Java, Composite Application Framework, Guided Procedures and Business Process Management).

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 2

Table of Contents

Introduction ......................................................................................................................................................... 3

Test Telnet to SMTP Connection ....................................................................................................................... 3

SMTP Configuration ........................................................................................................................................... 4

NetWeaver Administrator ................................................................................................................................ 4

Config Tool ...................................................................................................................................................... 6

Creating BPM Process ....................................................................................................................................... 8

Output ................................................................................................................................................................. 9

Create Leave Request Task ........................................................................................................................... 9

Approve: ........................................................................................................................................................ 10

Related Content ................................................................................................................................................ 11

Disclaimer and Liability Notice .......................................................................................................................... 12

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 3

Introduction

This article deals with sending email notifications in BPM. If a task is created in the Universal Work List of the user, the user will be notified by a mail. Configuring our own mail templates is not introduced in BPM in CE 7.1 Ehp1.

Test Telnet to SMTP Connection

In order to send email notifications first we need to check whether SMTP Server is accessible from our SAP NetWeaver Composition Environment Server. For this we need to do the following steps.

Open Command Prompt in the SAP NetWeaver Composition Environment Server. Write the following commands to test the connection.

1. telnet <SMTP-Server-host> <Port>

By default the port will be 25. Check with your IT Services people to get the host name of the SMTP Server.

For E.g.: telnet mail.redbottle.com 25

Success Response: 220 mail.redbottle.com RBLT Fri, 18 Sep 2009 11:34:44 +0530

After connecting to the SMTP Server enter following commands

2. EHLO <Your-domain-name>

Success Response: 250 OK

3. MAIL FROM:mymail@domain

Enter the mail Id of the sender.

Success Response: 250 2.1.0 mymail@domain....... Sender OK

4. RCPT TO:mymail@domain

Enter the recipient mail id

Success Response: 250 2.1.5 mymail@domain.......

5. DATA

Press Enter

“354 Please start mail input.” Press Enter

“This is a Test Message” press Enter again

Enter “.” and press Enter again.

250 Mail queued for delivery.

A mail will be delivered to the recipient inbox.

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 4

SMTP Configuration

Smtp Configurations can be done in two ways.

1. NetWeaver Administrator 2. Offline Config Tool.

NetWeaver Administrator

Let’s see how to configure it using nwa (NetWeaver Administrator).

First step is to configure the Notification Message Service.

1. Open NetWeaver Administrator using the url Error! Hyperlink reference not valid. 2. Go to Configuration Management Scenario Configuration Wizard.

3. In the configuration wizard execute the Configuration task “BPM All Tasks Combined”. Configuration Wizard overview window will open.

Enter the connectivity information to mail server.

For E.g.: Host: mail.redbottle.com

User: vasudagayathrikavi (User name)

Email Address: [email protected] (mail id of the user)

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 5

Password: password of the user email account

Click “Next”.

Select the check boxes “Notify all potential processor if new task available” and “Notify actual processor if existing task was reassigned”. This will enable the mail server to send mail notifications when a new task appears in the UWL or when a task is reassigned.

Enter http://<fully qualified domain name> :< port> as the Base URL.

Finally Click Next.

With this we have completed the execution of Configuration Task “BPM All Configuration Tasks Combined”

After execution the status of the task changes from “Initial” to “Finished Successfully” as shown in the figure below.

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 6

4. Configure the Java Mail Client

In nwa navigate to Configuration Management Infrastructure Java System Properties

Navigate to the Services tab

Select “Java Mail Client”.

In the Properties Tab, enter the custom value for “mail.from” as the sender mail id and “Smtp” as the SMTP server name. as shown in the figure below using the “Modify” button.

With this we have completed the configuration of Notification Message Service using nwa.

Now let’s see how to do it using config tool.

Config Tool

Notification Message Service Configuration using Config Tool:

1. In the NetWeaver Server go to Start menu. In the Start Menu select Config tool as shown in the figure below.

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 7

2. In the template node navigate to server instance applicationssap.comtc~bpem~base~ear.

In the Application properties enter the following custom values as shown below.

Enter the base url as http://< fully qualified domain name >:50000 using the set Custom value button.

Click Save to save the settings.

Restart the instance to apply the new settings.

With this we have completed the configuration settings using both NWA and config tool. Now if a new task is created in the UWL (Universal Work List) of a user, notification mail will be sent to the user. Create a BPM process and deploy it and start the process. A new task will be created in the user’s UWL.

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 8

Creating BPM Process

Create a BPM Process as shown below. Employee will login to the application and enter the leave request details. After he submitted the leave request it will go to the approver for approval. The user for the Create Leave Request is VasudaGayathriKavi and the user for the task “Approve/Reject Leave Request” is “Fazal Ahamed”.

To know how to create a BPM Process and start the BPM Process in detail, go through the article SAP NetWeaver Business Process Management – End-to-End Process Implementation Sample

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 9

Output

After starting the BPM Process, a notification mail will be sent to the user of the “Create Leave Request” task. Open the mail box and check whether any mail has been generated in the user mail box.

The mail will be as shown below.

From the mail we can directly access the task as well as the Universal work list using the hyperlinks provided.

Create Leave Request Task

Click Submit.

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 10

Approve:

Now a task will be assigned to the approver. So a mail will be sent to the user of the task “Approve/Reject Leave Request”.

The mail will be as shown below.

The task will be as shown below.

Finally approve or reject the leave request. This will end the process.

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 11

Related Content

Composition Home Page

Enabling Email Notifications in GP – CE 7.1 Ehp1

SAP NetWeaver Business Process Management – End-to-End Process Implementation Sample

Configuring Notification Messages Service

BPM Home Page

Enabling eMail Notifications in SAP NetWeaver BPM CE 7.1 Ehp1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 12

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.