Developer

IBM Maximo: How to add Social Networking buttons to your application

In the past months 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. The solution is based on Twitter4J library, a  Java Twitter’s API library.

In this article I’m showing you how to add Social Networking button to your application, for example the Twitter button to your Maximo Service Request (SR) application:

Twitter Button
Twitter Button

 

This feature may address the following Customer’s requirement: sending a notifications for Service Requests ‘s updates. In this scenario instead of to send email notifications for a Service Request I’m showing you how to send a Tweet to notify an user.

 

FIRST of all you have to define a new application in your Twitter account:

 

IBM Maximo Twitter Application definition
IBM Maximo Twitter Application definition

 

to grant the application authorization to post on the user’s behalf. In our scenario the Maximo Java code will post using my Twitter account by Outh authentication. You can easily create an Twitter application in your account here.

 

SECOND you have to extend the TICKET object with two attributes (using Maximo database configuration) :

  • TWITTERACCOUNT (ALN, 15)  to store the Twitter user account
  • TWEETTHISTEXT (ALN, 140) to store the text to tweet

 

THIRD you have to modify the SR application with the following items (using Maximo application designer) :

  • two text field associated with two new attributes created on TICKET object.
  • a button, that is your social network button.
  • a signature to manage the button-pressed event action, see IBM Maximo application developer guide for details.

You can use your Tweet button preferred image in maximo\applications\maximo\maximouiweb\webmodule\webclient\skins\tivoliXY\images ,  remember to rebuild & redeploy the Maximo ear in your Application Server before to use the new SR application.

At the end the SR application looks like this one:

 

IBM Maximo SR application with Tweet Social Button
IBM Maximo Service Request application with Tweet Social Button

 

FOUR you have create a Maximo Java custom action to handle the buttonpressed event. Your class must implement the psdi.common.action.ActionCustomClass interface and it must to implement the applyCustomAction method

 

 

I have also used a private method to tweet message

 

 

the complete and tested Java class here

TweetThisTextAction (4.9 KiB, 252 downloads)

Last step before to use the new social button is to define the custom action using the signature name previously defined in SR application design (using Maximo action application) :

 

Java Custom Action used to tweet
Java Custom Action used to tweet

 

Finally I pressed on my Social button to tweet to @gmnesodo user using my personal account linked to Maximo application:

 

Tweet from Maximo SR
Tweet from Maximo SR

 

So the tweet is composed by the Service Request number and the text (Everything in its Right Place, “Radiohead, Op. Cit.”) previously inserted in SR application’s field.

Enjoy using social networking button in IBM Maximo, your comments and suggestions are welcome.

Tags
Show More

Mario Noioso

IBMer, engineer, technology enthusiast, inventor, coder, gamer, Linux lover, bassist wannabe, TBD. Nerd since 80s.

Related Articles

9 Comments

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

HTML Snippets Powered By : XYZScripts.com
Close