Skip Headers
Oracle® BPEL Process Manager Order Booking Tutorial
10g (

Part Number B28987-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

13 Using Notifications

This chapter of the tutorial describes how to add notifications.

This chapter contains the following topics:

13.1 Introduction

This phase of the tutorial adds notifications to the POAcknowledge process. Ensure that you have successfully completed the phases in Chapter 9, "Using the File Adapter's Write Functionality" and Chapter 12, "Using Sensors" before performing this phase. Notifications enable you to send notification about an event to a user, group, or destination address. You can send a notification by e-mail, voice mail, or Short Message Service (SMS). In this phase, you send an e-mail notification to confirm receipt of an order. You perform the following tasks:

13.2 Adding an E-mail Notification to the POAcknowledge Process

This section contains the following tasks:

13.2.1 Configuring Your Company E-Mail Environment

  1. Go to the SOA_Oracle_Home\bpel\system\services\config directory.

  2. Make a backup copy of the ns_emails.xml file.

  3. Open a text editor.

  4. Open ns_emails.xml and replace NONE with EMAIL for the NotificationMode parameter. Replace the other parameter values shown in bold with ones appropriate to your company environment.

    <EmailAccounts xmlns="" 
             <FromName>Oracle BPM</FromName>
             <Password ns0:encrypted="false" 
  5. Change the e-mail addresses for the users jcooper and jstein to e-mail accounts you can access. If an XML-based JAZN provider is used, these properties can be changed in


    The following code example shows where to change e-mail addresses:

      <description>Demo User</description>
  6. Save your changes and exit the file.

  7. Restart Oracle JDeveloper.

13.2.2 Creating an E-mail Service

  1. Double-click POAcknowledge.bpel in the Application Navigator.

  2. Select Process Activities from the Component Palette section.

  3. Drag and drop an Email service from the Component Palette section to below the InvokeFileOut Invoke activity.

  4. Enter the following details:


    Instead of manually entering an expression, you can click the icon to the right of the field to display the XPath Expression Builder to dynamically build your expression.
    Field Description
    From Account Default
    To: Enter a valid e-mail address.
    Cc: Enter a valid e-mail address.
    Bcc: Enter a valid e-mail address.
    Reply To: Enter a valid e-mail address.
    Subject: PO Acknowledgment for Items Ordered and Price
    Body: Press the icon to the right of this field to display the XPath Expression Builder window. Use this window to build the following expression, and click OK when complete.

    concat(string('Dear Customer, Your order number '),bpws:getVariableData('inputVariable','payload','/ns1:PurchaseOrder/ns1:ID'),string(' for customer '),bpws:getVariableData('inputVariable','payload','/ns1:PurchaseOrder/ns1:CustID'),string(' has been confirmed. The order status is "'),bpws:getVariableData('inputVariable','payload','/ns1:PurchaseOrder/ns1:OrderInfo/ns1:OrderStatus'),string('". Thanks for using Order Booking Application from Oracle BPEL Process Manager. Administrator.'))

  5. Click OK.

13.2.3 Validating, Compiling, and Deploying the POAcknowledge Process

  1. Go to the Application Navigator section.

  2. Right-click POAcknowledge.

  3. Select Deploy > my_integration_server_connection > Deploy to default domain.

  4. Increment the version number again of the project when prompted and click OK (for example, enter 1.1).

    This compiles the BPEL process. Check for errors by clicking the buttons at the bottom of the window. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 4.

13.2.4 Running the POAcknowledge Process

  1. Log into Oracle BPEL Control by selecting Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > BPEL Control (or refresh the page if it is already open).

  2. Enter the following details to log into Oracle BPEL Control and click Login:

    Field Value
    Username oc4jadmin
    Password password

    Where password is the value you entered during installation.

    The Dashboard tab of Oracle BPEL Control appears. Note that your BPEL process, POAcknowledge, now appears in the Deployed BPEL Processes list.

  3. Click the POAcknowledge version you increased in Step 4 in the Deployed BPEL Processes list.

  4. Enter details in all fields of the HTML Form and click Post XML Message.

  5. Refresh Oracle BPEL Control.

  6. Click the Instances tab.

  7. Click the POAcknowledge instance.

  8. Click the Audit link to view progress.

  9. Check your e-mail account to verify that e-mail has been delivered (there can be an e-mail server-based delivery delay).

13.3 Summary

You have now added notification logic to the process.

With the completion of this phase, the OrderBooking process is now completely configured for order acknowledgment through e-mail notification.