Saturday, September 29, 2012

Email notifications from BPMN processes using the pre-built VM for SOA and BPM Suite 11g

In tomorrow's OpenWorld session UGF10464 - ADF EMG User Group: Oracle Fusion Middleware Live Application Development Demo a team of developers will build and demo an application based on Fusion Middleware (ADF, SOA Suite, BPM Suite, Database). We will use the pre-built Virtual Machine for SOA Suite and BPM Suite 11g for this. The VM contains a fully configured and ready-to-use SOA Suite and BPM Suite 11.1.1.6.0 installation (PS5). Note that this is a development VM that shouldn't be used for production environments.

The application implements the process of submitting, reviewing, and scheduling abstracts for a conference. An overview of its components is shown in the following figure:



Presenters will be notified of the progress of their abstract submission through email. For example after approving or rejecting the abstract and after evaluation of the presentation. This can be seen in the following figure that depicts the Abstract-to-Presentation process:



This blog explains how to configure the pre-built VM to send email notifications from BPMN processes.

Configure Email Server and Client

The VM is pre-installed with JAMES, an open-source Java mail server. JAMES is located in the following directory on the VM: /opt/ApacheJames/james-2.3.2. The mailserver is already prepopulated with several users. You can add your own users to it using Telnet (see http://james.apache.org/server/2.3.1/adding_users.html).


JAMES is preconfigured in the Virtual Machine to use emailExample.com as servername, meaning that any newly created email address will have the following format: username@emailExample.com; for example ronald@emailExample.com. You can change this setting in the following file: /opt/ApacheJames/james-2.3.2/apps/james/SAR-INF/config.xml.

Next you can use an email client to connect to JAMES to verify that emails can be send and received. JAMES is configured with the following port numbers: 110 for POP3 and 25 for SMTP.

If you connect to JAMES from outside the VM you have to make sure that port forwarding in VirtualBox is configured so that the SMTP and POP3 ports are accessible to your email client.


Configure BPM Suite

You can send emails from BPMN processes by using a Notification activity and choosing email as Notification Type in the implementation properties. Make sure the To address evaluates to an emailadress that exists in JAMES.


Next you have to configure BPM Suite in Enterprise Manager so that the notifications are sent through JAMES. You have to configure both the Email Driver Properties of the usermessagingdriver-email (part of the User Messaging Services or UMS), as well as the Workflow Notification Properties. This is described in a blog by Craig Barr.

Take care that you also configure the Workflow Notification Properties. Workflow Notification is primarily configured to enable email integration for Human Tasks. This way task assignees of new tasks are notified through emails and actionable tasks can be completed through emails. However, these settings also need to be configured to enable email notifications sent from processes.

No comments:

Post a Comment