BPM for FS

Configuring Email Notification – Apache James on Linux

Apache James is a Mail Server that is used to send emails from Linux , the scope of this section would be to send emails from BPM routed through Apache James Download Apache James Server Binary (james-2.3.2) from http://james.apache.org/ and unzip the file to following directory /home/your-system-name/Oracle/ Start SOA BPM Server. check if sendmail is already running if yes , we need to kill the process or else we will not be able to start james , please do not get confused my system name is also james 🙂

[[email protected] fmw]# netstat -pant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 *               LISTEN      1250/cupsd          
tcp        0      0  *               LISTEN      994/sendmail: accep 
[[email protected] fmw]# kill 994

Starting Apache James on Linux

[[email protected] bin]# ./run.sh
Using PHOENIX_HOME:   /home/james/Oracle/james-2.3.2
Using PHOENIX_TMPDIR: /home/james/Oracle/james-2.3.2/temp
Using JAVA_HOME:      /home/james/Oracle/jdk1.6.0_30/
Running Phoenix:
Phoenix 4.2
James Mail Server 2.3.2
Remote Manager Service started plain:4555
POP3 Service started plain:110
SMTP Service started plain:25
NNTP Service started plain:119
FetchMail Disabled
Adding users to James Mail Server and Configure Domain
[[email protected] james-2.3.2]$ telnet localhost 4555
Connected to localhost.
Escape character is '^]'.
JAMES Remote Administration Tool 2.3.2
Please enter your login and password
Login id:
root ( remember this is NOT your system root password )
Welcome root. HELP for a list of commands
adduser jcooper welcome1
User jcooper added
adduser jstein welcome1
User jstein added
adduser cdoyle welcome1
User cdoyle added
adduser wfaulk welcome1
User wfaulk added
adduser jlondon welcome1
User jlondon added
Existing accounts 5
user: jstein
user: jlondon
user: wfaulk
user: jcooper
user: cdoyle
Connection closed by foreign host.

We will be using jamesbank.com as our domain name so this needs to be configured.

[[email protected] SAR-INF]# pwd
[[email protected] SAR-INF]# sudo gedit config.xml

Once config.xml is opened in the edit more add the following lines marked in bold

<servernames autodetect="true" autodetectIP="true">

Add Entry to Host file

[[email protected] SAR-INF]# sudo gedit /etc/hosts       localhost    james    jamesbank.com

Now we are pretty much done on Linux side to make james working

Configuring Enterprise Manager to Send EMails

Its assumed that you have already seeded Jcooper, Jstein , JLondon, Wfaulk, CDoyle and other users to the soa bpm user list if not have a quick look at this article. login to EM (http://localhost:7001/em/) as weblogic ,

Select User Messaging Services -> User Messaging Email Driver , Map the following

Sender Address = [email protected]
Default Sender Address = [email protected]
Mail Access Protocol = POP3
Receive Folder = INBOX
Outgoing Mail Server = jamesbank.com
Outgoing Default Mail address = [email protected]
Outgoing password = welcome1 (use clear text)
Outgoing Mail Server port = 110
Incoming Mail Ids = [email protected]
Incoming User Id = jcooper
Incoming password = welcome1 (use clear text)

then click on Apply ,

Note you can replace jcooper and wfaulk with any generic name such as BpelAdmin or SoaAdmin or Notification Services @jamesbank.com as you wish Select farm_fmw_domain -> SOA -> soa_infra -> SOA Administration -> Workflow Config -> Workflow Notification properties , set from, reply to and actionable address

Screenshot from 2013-01-27 12:05:34

Install and configure thunderbird for [email protected]
[[email protected] SAR-INF]# yum install thunderbird

this will install thunderbird , launch the mail client and add account

Account Name = [email protected]
Email Address = [email protected]
Your Name = jcooper
Server Name = jamesbank.com
Port = 110
user name = jcooper
connection security = none
Authentication Method = Password transmitted insecurely
Outgoing server = SMTP
Server Name = jamesbank.com
Port = 25
username = jcooper
password = welcome1

Screenshot from 2013-01-27 12:11:41

Wiring Notification a BPM Process

To test email let us create a simple Synchronous BPM process, Drag and Drop Notification between start and end , deploy the application and test it.

Screenshot from 2013-01-27 12:17:08

Now once the process is completed we should be able to see the test mail, Note it is recommended that you have a generic process that can take input parameters as TO Email Id, From Email Id, Subject and Body , then this can re-used across many different processes

Screenshot from 2013-01-27 12:20:09

to Stop Apache James

[[email protected] bin]# ./phoenix.sh stop
Using PHOENIX_HOME:   /home/james/Oracle/james-2.3.2
Using PHOENIX_TMPDIR: /home/james/Oracle/james-2.3.2/temp
Using JAVA_HOME:      /home/james/Oracle/jdk1.6.0_30/
Shutting down Phoenix:
About Author