Skip to main content link. Accesskey S
  • IBM.com
  • Lotus software
  • Machine Translation



Home > Integration > Accessing Connections data from a Mashup

Accessing Connections data from a Mashup

No abstract provided.
I am writing an IBM Mashup Center lab for an enablement event on Integration.

The idea is to demonstrate various integration points between different IBM products. In my lab I wanted to do this using out-of-the-box widgets - or at least those that are available on Lotus Greenhouse - I'm no developer and I like to support the idea that you don't have to be one to build useful mashups!

I wanted to be able to show integration with Connections profiles but there aren't any out-of-the box widgets available yet for accessing Connections data (these are due to be available with IBM Mashup Center 2.0 later this year). However, you can use REST calls to Connections to pull data back as an ATOM feed.

For example if you use this REST call

http://connections.acme.com/profiles/atom/reportingChain.do?email=the@email.address

in a URL customizer widget.

and then wire this widget between a Data Viewer widget (that sends an email address) and a Feed Reader widget (configured to consume an ATOM feed) , you can pull back the management reporting hierarchy, as stored in Connections, for the associated user into the Feed Reader widget.

With the added bonus, that the Feed Reader displays links on which you can click to get to the Connections profiles.

Here's how to do it:

    1. Define your data source (I used a CSV file with two columns: Name and Email) 2. Go to the Mashup Center (e.g. https://greenhouse.lotus.com/mum/enabler)
    3. Create a new page and go to it
    4. Create widget to display data from CSV file
        1. From the Favorites drop-down, drag the Data Viewer widget onto the page
        2. Click on Edit Settings
        3. Set the URL to the one you got in step (1)-(6) above
        4. Click on Load
        5. The widget will attempt to retrieve a feed of the CSV file. Check both the Name and Email columns
        6. Click on Save
    5. Create a widget to generate a parametrized URL 6. Create a widget to render the Report-To chain 7. Now, let's make magic happen! Le's wire everything together
        1. Create a wire from the Data Viewer widget to the URL Customizer
            1. On the Data Viewer widget, click on Edit Wiring
            2. Under Send, select Email as Text
            3. Select URL Customizer as the widget to send data to
            4. Select Accept Parameters using Any Data
            5. Click on Done
        2. Create a wire from the URL Customizer widget to the Feed Reader widget
            1. On the Feed Reader widget, click on Edit Wiring
            2. Under Receive, select Get Atom from Url using URL (ATOM)
            3. Select URL Customizer as the widget to receive data from
            4. Select URL as URL
            5. Click on Done
    8. Ta Da! You are done; you have now created a mashup between a CSV file and Lotus Connections' Report-To Atom API. Whenever you click on a row from the CSV file, the user's email address will be sent to the URL Customizer widget. At the same time, the URL Customizer widget will generate a URL to an Atom feed of the user's Report-To Chain. This URL is then passed on to the Feed Reader which fetches the feed, parses the Atom feed, and converts it to HTML for rendering in the screen.
    9. Bonus points: Now add a Web Site Displayer widget which displays the profile of a user selected in the Feed Reader widget
        1. This is left as an exercise to the reader

This Version: 10 October 15, 2009 7:10:51 PM by developerWorks Lotus Team
Originally Added: Version 1 April 28, 2009 5:11:11 AM by Karen Brent
Created by Karen Brent on May 9, 2009 3:49:13 AM

The URL Customizer widget was included with the IBM Mashup Center 1.1 code, so if you don't have it listed in your ToolBox it could be that you are still on Mashup Center 1.0?

However, you can still get the same end result as shown above but you have to use the JavaScript Adapter widget instead of the URL Customizer widget. To do this you need to paste the URL for the REST call shown above into the Settings for a JavaScript adapter and then put the text

return "

in front of the URL

remove the characters that follow the "=" sign in the URL and put the following text after the "=" sign.

" + payload