best grammar app

How to send SMS notification through your BPM Tool

Submitted by anand on Fri, 2011-09-23 21:59
sxc.hu

Business processes often need SMS notifications in many scenarios. The notification can be to the client or Administrator or the BPM user.

This article assumes you have a BPM tool which is Java based. I will be explaining you how you can create and adapter which sends SMS notification.

 

Step 1: Initial Requirement

To send SMS through Java code we need have following pre requisites:-

(note:- assuming that we will be sending SMS which would URL based.)

  • Buy a sms pack (bundle), following comes along with the bundle:-
    • The URL, which is called through the code
    • User name provided my the SMS provider
    • Password
    • The parameter format

 

Step 2: Determine the Interface

Determine how the SMS code needs to interact with the Business Process. A typical scenario would be to have an adapter which does that for you. Have the right setters and getters and then the worker method which can do that for you.

 

package com.constonline.utils.sms;

 

public class MySMSAdapter {

 

      private String mobileName;

      private String message;

 

      public String getMobileName() {

            return mobileName;

      }

 

      public void setMobileName(String mobileName) {

            this.mobileName= mobileName;

      }

 

      public String getMessage() {

            return message;

      }

 

      public void setMessage(String message) {

            this.message= message;

      }

 

}

 

Step 3: The Worker Method

The worker method is the method which will act as SMS sender.  In this example we are assuming sendSMS () is the worker method.  From your BPM process you would need to instantiate this class, call the setters and then the generate method. For a tool like Savvion Business manager it can be done very easily by including your adapter in the process model.

 

Here is what you need to do in your Worker method

  • Create the URL as provided my the SMS provider
  • Set the required attributes such as username, password etc..
  • Add mobile number and message
  • At last it a simple java URL call

 

package com.constonline.utils.sms;

 

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

import java.io.UnsupportedEncodingException;

import java.net.HttpURLConnection;

import java.net.URL;

import java.net.URLEncoder;

 

 

public class SMSSender {

      /*

       * The parameters as provided by the SMS provider. Note:- It is not


Abhishek Anand
Business Process Management professional. Experience in working with Multitier J2EE Applications and BPM Systems.
best grammar app

About BPMGeek

BPMGeek is an initiative to collaborate and communicate with the growing Business process management community out there. The goal is to help developers connect with experts, ask questions, post their learning and get understanding of BPM Concepts. Often tool specific knowledge of niche areas end up developers perplexed and confused - especially when there are very less number of resources available. We will be coming up several several new features. Have a look at our Roadmap here

BPMGeek is an independent entity not associated with any Product. All BPM product professionals are invited to contribute. The Logos and Names used across the site belong to their respective owners. The viewpoints mentioned by Individual contributors are their own. BPMgeek cannot be held liable for any issues arising out of it.


BPMgeek is promoting the Nounshoun English Grammar App - developed by Constellation Software.