Bridging the gap to Fusion through our PeopleSoft Solutions Extenders
Grey Sparling PeopleSoft Expert's Corner
Oracle Blogs
 Subscribe Now!
Interact with the experts here at Grey Sparling

Wednesday, January 18, 2006

Integrating GoogleTalk with PeopleSoft

We've been spending quite a bit time lately working on our Grey Sparling PeopleSoft Solution Extenders. As you can tell from reading the weblog and our main website, reporting and analytics are a key area of focus for us.

One of the interesting challenges in this area is notifying users of what they're interested in. As part of the Grey Sparling Report Security and Distribution PSE, we have built a way of delivering highly formatted custom emails to each user as well as a new Report Explorer, which greatly expands on the capabilities of the PeopleSoft Report Manager. (Don't worry - there's more meat to this post than just telling you about stuff that you can buy from us :-)

As a follow on to that work, I wanted to write up a blog post about tying in instant messaging to the report notification. PeopleSoft added some support for instant messaging back in 2003 (I actually got sucked into doing interviews when we added support for AIM and the marketing folks were out on some offsite meeting :-), but it only handled presence detection and providing "click-to-chat" links on a page.

The example here shows deeper integration. A user runs a report (or it is run for them).







When the report is done, we start a chat with any of the users that are authorized for that report (if they're online) and send them a direct link to the report.





Now the user is directly in the PeopleSoft Report Manager. Or if they are a Grey Sparling customer, they get a much nicer interface with our Report Explorer.





In order to do the deeper integration, we're actually leveraging the Smack library from Jive Software. This is an open source Java library that understands the XMPP protocol that we'll call from within PeopleCode.

For those that aren't familiar with XMPP, it is an open standard for IM (messaging and presence). Aside from Jive (who have commercial IM servers based on XMPP) and some other open source XMPP based IM servers, there are a few other big names that support XMPP. From the title, you probably already guessed that GoogleTalk, Google's IM service, is based on XMPP.

You might not know that Oracle's Collaboration Suite IM product is also based on XMPP. I don't know why they don't do a better job of marketing that - with all of the news about Google getting into IM and being standards-based, you'd think that the Oracle marketing folks would have been talking up the fact that they have a corporate solution that works with the same standard. But, I digress :-)

At a high level what we're doing is adding some new subscription PeopleCode to the message that gets sent when reports are published. The PeopleCode picks out the URL for the published report and who the report is being distributed to, and then looks to see if any of those users are online. If so, it starts a chat with them and provides the direct link to the reports.

Before I explain how you can try this out yourself, I want to point out several things about this that make it just a proof of concept and not production ready, so if you find this interesting, please don't just stick this as is into your production PeopleSoft environment!




  • It connects to the Google server each time a report is published. This is OK for a little experimenting because it simplifies the code a bit, but definitely not the way to do things for real. Especially since we have to wait a few seconds to receive the presence packets from the server.
  • The username and password to connect with are hard-coded in the PeopleCode. A production version would store this info in the DB somewhere for easier maintenance.
  • The text that it sends out is hard-coded to one language. Works for a demo, but not the right way to do things.
  • The error checking is less than robust. Any problems and we punt.
  • The demo code does not listen for the user to type anything back. It's not really instant messaging if it's a one way conversation! If you look at the Smack APIs, you'll see that they support receiving text back from the user, so beefing up this code to support that wouldn't be too hard.
  • The PeopleCode is attached directly to the PSRF_REPORT_CREATE message. We never touch delivered PeopleSoft objects in our Grey Sparling PeopleSoft Solution Extenders because we don't want to cause any upgrade or support issues, so we'd implement this differently if it became shipping product. The other day, a little birdie told me that PeopleTools 8.48 (shipping mid-year 2006) supports having subscription PeopleCode detached from the message definition itself though. Then this particular problem goes away.
  • It's not multi-threaded. If you have a single report that is being distributed to a group of people, then this code sends them messages one at a time. Not very scalable.
  • Only tested on PeopleTools 8.4x.
I'm sure that there's other areas for improvement here - feel free to ping us if you come up with some.

To try this yourself, you need to:
  1. Have an account on an XMPP based server (such as GoogleTalk).
  2. Download the Smack libraries and place the smack.jar and smackx.jar in your PSHOME\class directory.
  3. Open up the PSRF_REPORT_CREATE message in Application Designer and insert a new subscription PeopleCode program (right click on Subscriptions to insert a new one). I called mine GoogleTalkNotify, but you can use whatever you want.
  4. Add this PeopleCode, editing it for your username and password.
Here's what the code itself looks like. Remember that this is just proof of concept stuff and not supported in any way. You are free to use this however you want.

Labels:

3Comments:

At 9:53 AM, March 05, 2008, Blogger Jeromy McMahon said...

This is a great proof of concept! I think I am going to utilize this in some fashion with out JiveTalk server here at ASU.

Thanks for the sample and demo!
Jeromy

 
At 9:36 AM, September 05, 2008, Blogger Jim Marion said...

Nice work Chris! Very nice. You should demo this at a user group conference. A lot of companies use XMPP for internal chat servers (Jabber, etc).

 
At 6:17 PM, September 06, 2008, Blogger Chris Heller said...

Actually we have shown this at a few different conferences, but we're always up for more :-)

In fact, we have an open invitation out to a few other folks within Oracle to hook this up with the Oracle Collaboration Suite (since that uses XMPP for instant messaging), but haven't heard anything back yet.

 

Post a Comment

<< Home