IBM Maximo: integration with Twitter
I designed a solution to integrate IBM Maximo and Twitter to address a common requirement: to notify the users when something happen in IBM Maximo. For example an user group should be notified when an workorder change status. So to take advantage of social network I’m showing you a proof of concept about IBM Maximo and Twitter integration.
The solution is based on Twitter4J library, aย Java Twitter’s API library.
Here a brief presentation of IBM Maximo Asset Management:
Here a brief presentation of Twitter
So the Customer’s need was to notify the application users when a Work Order is created or when a Service Request is opened. The smart phone extensive use enables to users to the social networks , so my suggest has been to use Twitter inside Maximo.
This is the scenario
A Company has a Twitter account and it wants use the social network to communicate with own users.
The employees, business partners, operators, users are followers.
Maximo uses the Company’s twitter account
Users open a Service Request by a tweet using the Companyโs Twitter account
This is my approach
Maximo leverages on Twitter4J library to get the Twitter timeline and to tweets the users.
Twitter4J is Java library to interact with the Twitter API
Twitter4J is Zero dependency, no additional jars required
Twitter4J use the built-in OAuth support
The high level design
Steps
Create a Twitter company account
Goto into apps Twitter and register a new application, Maximo is just another twitter app
I developed the java class Maximo4tw, using the MBOs framework.
To open a Service Request
Users tweet to Company account
The tweet mentions the Company Twitter account ( in this example @the_n0ise) with the hashtag #newServiceRequest
To read the Maximo tweets
Users read the Compnay timeline
It’s possible write a tweet with the workorder number, the description and the status
Under the hood
Using the Twitter Factory Java class from Twitter4j library:
TwitterFactory tf=new TwitterFactory(cb.build()); twitter=tf.getInstance();
create a crontask to read the Twitter timeline, using Twitter4j library
This is the crontask code:
public void run() { authTwitterApps(); try { Query query = new Query("#newServiceRequest"); QueryResult result; SRSetRemote srSet = (SRSetRemote)MXServer.getMXServer().getMboSet("SR", MXServer.getMXServer().getSystemUserInfo()); do { result = twitter.search(query); List<Status> tweets = result.getTweets(); for (Status tweet : tweets) { ...
To send a tweets from Maximo when a WorkOrder status change:
public Status sendTweet(String tweet) { Status status = null; try { status = twitter.updateStatus(tweet); } catch (TwitterException te) { te.printStackTrace(); }
Your comments and suggestions are welcome.
Brilliant job !
I’ll write you privately ๐
Which jar do you need ? The Twitter4j.jar is available on-line.
I can’t give you the businessobject.jar with my custom class but you can copy my code on-line ๐
si puoi proporla, non c’รจ un patent sull’idea ๐
Yes, it does ๐
does it really work ?
Ottima idea, posso proporre in giro ?
Cool, do you have the jar ?
hello can you help me do this task please? please write me private message