best grammar app

Free Download: Java Based BPM Adapter for Updating Status on Twitter

Submitted by Abhishek on Sat, 2011-10-01 20:33

Our BPM Applications are now being more and more social. Think about a workflow which uses an approval process before a Tweet can be posted. You can have a full feldeged corporate review before it gets published. Or else you can have a simple workflow which allows your entire firm to participate and tweet.

  An Example workflow could look like


Well, you can use the instructions below to create the adapter which executes at the end. The first steps are simple, create a workflow with a single field – “Message”. You can have fields for storing information required to take the decision to approve.


Lets get started


Step 1: Register an Account In Twitter

First go ahead and create an account on twitter. Once registration is done and you are logged in, Open the Developer Zone using the URL This can also be done by clicking the Developer link on the bottom of the twitter page


Step 2 : Create an Application

In order to tweet, you will need to create an Application. Click on the Create New Application Button on the right side of the page. Fill in the details of your application


Fill in the details about your application and Submit the page


Step 3: Get your OAuth Keys

You will need to get the following keys for the integration to work. Oauth is the mechanism used to authenticating you to twitter. Normally you can use your own keys to publish status messages. The key has four parts

  • Consumer Key
  • Consumer Secret
  • Access Token
  • Access Token Secret

As soon as your application is created you will be able to see your Consumer Keys created

Remember your keys can be misused so make sure you keep it safe with yourself.


As soon as you create the keys you will see that the access is Read-Only. You will need to change it to Read Write from the SETTINGS tab. After your changes are done it will take a minute to reflect


Once you see that the Access Level is Read –Write, Now you should generate your access token. Please note if you generate the token before changing the Consumer Key Access Level to Read Write, you will end up generating read only keys.

Once the keys are generated you will see a screen like the one below


All Set. Now lets write the application


Step 4: Get the libraries

For this example, I am using a great library called Twitter4J which is available for download at Once you have downloaded, just copy it to a place where you can load it. For example in my eclipse project, I have put it in my “lib” directory and made it available in my classpath. During runtime, you can place it anywhere  in the classpath.


Step 5 : Write the adapter

The adapter is fairly simple. You have a simple class called TwitterAdapter which has five fields

Generate the getters and setters for the same


Then, Provide the worker method called tweet(). It looks like

Abhishek Mishra
Good experience in working with BPM technologies like Savvion, JBPM. Founder and Chief Editor of Founder of Savvion Business Manager Mobility Framework Savmobify| View my BPMGeek Profile
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.