Blogs

DJ Adams

SAP and Google Wave - Conversation Augmentation
DJ Adams Active Contributor Bronze: 250-499 points SAP Mentor
Business Card
Posted on Sep. 07, 2009 11:35 PM in ABAP, Beyond SAP, Emerging Technologies, Integration and Certification, Python, Scripting Languages

URL: http://www.youtube.com/watch?v=G7W2M6H3OQo

Subscribe.Subscribe
Print. Print
Permalink Permalink
Share

It's been pretty much six years to the day since I wrote here about Dashboard, Nat Friedman's project and implementation of a realtime contextual information system. So I thought it fitting to make a short demo showing integration between Google Wave and SAP, inspired by the cluepacket-driven style shown so nicely with Dashboard.

I got my Wave Sandbox account a week or so ago, and have had a bit of time to have a look at how robots and gadgets work -- the two main Wave extension mechanisms. To get my feet wet, I built a robot, which is hosted in the cloud using Google App Engine (another area of interest to me) and the subject of this weblog entry. I used Python, but there's also a Java client library available too. You can get more info in the API Overview.

What this robot does is listen to conversations in a Wave, automatically recognising SAP entities and augmenting the conversation by inserting extra contextual information directly into the flow. In this example, the robot can recognise transport requests, and will insert the request's description into the conversation, lending a bit more information to what's being discussed. 

The robot recognises transport requests by looking for a pattern:

trkorr_match = re.search(' (SAPK\w{6}|[A-Z0-9]{3}K\d{6}) ', text)

In other words, it's looking for something starting SAPK followed by six further characters, or something starting with 3 characters, followed by a K and six digits (the more traditional customer-orientated request format). In either case, there must be a space before and a space following, to be more sure of it being a 'word'.

How does it retrieve the description for a recognised transport request? Via a simple REST-orientated interface, of course :-) I use the excellent Internet Communication Framework (ICF) to build and host HTTP handlers so I can expose SAP functionality and data as resources in a uniform and controlled way. Each piece of data worth talking about is a first class citizen on the web; that is, each piece of data is a resource, and has a URL.

So the robot simply fetches the default representation of the recognised request's 'description' resource. If the request was NSPK900115, the description resource's URL would be something like:

http://hostname:port/transport/request/NSPK900115/description

Once fetched, the description is inserted into the conversation flow.

I've recorded a short screencast of the robot in action.

 

 

 

DJ Adams  Active Contributor Bronze: 250-499 points SAP Mentor (@qmacro): SAP Hacker, Integrator, Author, Bread Maker. Find out more: http://www.pipetree.com/qmacro/


Comment on this article
Comment on this weblog
Showing messages 1 through 4 of 4.

Titles Only Main Topics Oldest First

  • Firewall
    2009-09-08 00:17:59 Daniel Graversen Business Card [Reply]

    Hi,
    Nice demo.
    How are you managing to have access to the SAP system from APP Engine. Is the port fully open.


    /daniel

    • ICF port open
      2009-09-08 00:22:51 DJ Adams Business Card [Reply]

      Hi


      Thanks!


      Well, the port's not half-open, if that's what you mean ;-)


      I've set the ICF to listen on 8990, and set a route on my router to forward TCP/UDP packets for 8990 to the machine hosting my SAP system. I chose 8990 as it's one of the ports that you can make HTTP requests to from App Engine - see PORTS_ALLOWED_IN_PRODUCTION in http://googleappengine.googlecode.com/svn-history/r56/trunk/python/google/appengine/api/urlfetch_stub.py


      Cheers
      dj

  • Code available?
    2009-09-08 00:04:03 Richard Hirsch Business Card [Reply]

    Hi,


    Looks cool. Have you thought about publishing the code in Google Code? Maybe in the existing SAP-Wave Project (http://code.google.com/p/sap-wave/)?


    D.


Showing messages 1 through 4 of 4.