Oracle SOA Suite- Implementing SMS Notification


In this post, I am going to show how to implement SMS notifications in Oracle SOA suite using BPEL process. So let's get started-

Implementing SMS notification in Oracle SOA Suite consists of below steps:
Environment-
  1. IDE- Oracle jDeveloper 11g
  2. Weblogic Server 12c
  3. Oracle SOA Suite 12c
High Level Steps
  1. Keep ready smpp server settings.
  2. Configure & enable usermessagingdriver-smpp for target SOA servers via console.
  3. Setting up Email driver (usermessagingdriver-smpp )with smpp server settings via enterprise manager.
  4. Enable notifications for SOA workflows(make sure either All or SMS option is selected).
  5. Create SOA composite application
  6. Deploy it on SOA server.
  7. Testing & done.
1. Keep ready smpp server settings.
Keep ready your below smpp server settings:
  1. SMS Account ID
  2. SMS Server Host
  3. Transmitter System ID
  4. Transmitter System Type 
  5. Transmitter System Password
  6. Transmitter Server Port 
  7. Receiver System ID
  8. Receiver System Type
  9. Receiver System Password
  10. Receiver Server Port 

2. Configure & enable usermessagingdriver-smpp for target SOA servers via console
  1. Login to weblogic console(http://host:port/console)
  2. Select domain in left panel
  3. Click on deployments
  4. Search for usermessagingdriver-smpp & click it
  5. Go to 'Settings for usermessagingdriver-smpp'

  6. Select targets
  7. Check all & click on 'Change Targets'
  8. Now select the servers where you want, I selected Admin Server L& SOA Server
  9. Click on 'Yes' button.
  10. Now your usermessagingdriver-smpp is enabled.
3. Setting up SMPP driver (usermessagingdriver-smpp)
  1. Login to weblogic em console(http://host:port/em).
  2. Now I want to configer smpp driver for soa_server1.
  3. Go to User Messaging left navigation panel and select usermessagingdriver-smpp (soa_server1).
  4. Now click on usermessagingdriver-smpp and select smpp driver properties
  5. Click on plus sign '+' to create a new configuration(this option comes in 12c version, 11g opens directly a email driver configuration page)
  6. Now fill the details under 'Create Driver Properties' with the help of smpp driver settings availabe in Step 1
  7. Test it and Ok.
4. Enable notifications for SOA workflows.
Now driver has been configured and need to enable notifications. This ca be done via below navigation:

SOA --> soa-infra(soa server) -->Right Click --> SOA Administration --> Workflow Properties --> Workflow Notification Properties --> Notification Mode : All/Email/SMS

Now our back end system is ready for sending SMS notifications for SOA workflows.

5. Create SOA composite application via jDeveloper
  • Start jDeveloper and create a new application 'SMSBPELApplication' of SOA type.
  • Create a new project 'SMSBPELProject' & finish.
  • Now we need a schema i.e. xsd. For this demo we use below xml schema
  • Process- Synchronous
  • Keep option checked - expose as a web service
  • Accept all defaults, 4 input & 1 output variable.
  • Ok.
  • Double click on bpel process(SMSBPELProcess) and there are two activities availabe in composite swimlane.
  • Add an assign activity
  • Double click and do assignment for output variable using expression builder 
concat('From: ',bpws:getVariableData('inputVariable','payload','/ns1:SMSElement/ns1:From'), '| To: ',bpws:getVariableData('inputVariable','payload','/ns1:SMSElement/ns1:To'),   ' | Subject: ',bpws:getVariableData('inputVariable','payload','/ns1:SMSElement/ns1:Subject'), ' | Message: ',bpws:getVariableData('inputVariable','payload','/ns1:SMSElement/ns1:Message') )
  • Ok.
  • Now add an email activity from component palet below the assign activity.
  • Configure SMS activity
From Number -> bpws:getVariableData(‘inputVariable’,’payload’,’/client:process/client:From’)
Telephone Number -> bpws:getVariableData(‘inputVariable’,’payload’,’/client:process/client:To’)
   Note: Telephone Number can be mapped from the users properties stored in LDAP
Subject -> bpws:getVariableData(‘inputVariable’,’payload’,’/client:process/client:Subject’)
Body -> bpws:getVariableData(‘inputVariable’,’payload’,’/client:process/client:Message’)
  • Save it.

6. Deploy it on SOA server
Now create a connection via jDeveloper to your target soa server & deploy the application.

7. Testing the web service
  1. Login to em console
  2. Go to your soa server
  3. Select deployed composites and select your project.
  4. Below web service testing screen will open.
  5. Enter an email id and click on Test Web service button & check it in flow trace and the email(provided in textbox).
Note:
  1. Notification status can be verified inside usermessagingserver -> Message Status
  2. If you don't have live smpp server settings and would like to try on demo smpp server then you can try with Selenium SMPPSim Simulator.  Here is the demo link http://bit.ly/2qdK4fM
Also visit my this blog for implementation of Email notifications via Oracle SOA Suite-  https://k10technical.blogspot.com/2017/04/oracle-soa-suite-implementing-email_28.html

References
https://sahilaneja.wordpress.com/2013/12/18/oracle-user-messaging-service-smpp/




Comments

Post a Comment

Popular posts from this blog

Oracle SOA Suite- Implementing Email Notification

Oracle SOA Suite 12c- PKIX path building failed & unable to find valid certification path to requested target

Migration of Oracle SOA Suite Composite from 11g to 12c