Have you ever thought that your organisation could be utilising IBM Connections more? The session will demonstrate the highly flexible and integratable component that is the IBM Connections' Activity Stream. The stream can be integrated into different IBM products such as IBM Notes and IBM WebSphere Portal but is also an Open Social Gadget and therefore can run within any OpenSocial container such as Apache Shindig. This stream is based on an open standard and the content within does not have to be from Connections alone. One business partner integrated Atlassian JIRA and Confluence content into the Activity Stream. This presentation explains and demonstrates how to utilise this functionality in your organisation.
Apidays New York 2024 - The value of a flexible API Management solution for O...
IBM Connections Activity Stream 3rd Party Integration - Social Connect VI - Prague - 2014
1. The Activity Stream: Your Gateway To
Pushing Higher Traffic Through
Connections
James Gallagher, Senior Software Engineer, IBM Ireland
2.
3. Please Note
IBM’s statements regarding its plans, directions, and intent are subject to change or
withdrawal without notice at IBM’s sole discretion.
Information regarding potential future products is intended to outline our general
product direction and it should not be relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a commitment,
promise, or legal obligation to deliver any material, code or functionality. Information
about potential future products may not be incorporated into any contract. The
development, release, and timing of any future features or functionality described for
our products remains at our sole discretion
Performance is based on measurements and projections using standard IBM
benchmarks in a controlled environment. The actual throughput or performance that
any user will experience will vary depending upon many factors, including
considerations such as the amount of multiprogramming in the user’s job stream, the
I/O configuration, the storage configuration, and the workload processed. Therefore,
no assurance can be given that an individual user will achieve results similar to those
stated here.
8. Activity Stream Features
Status Update + file upload with image/file preview
Timeago + Permalink
@mentions
URL Preview
Inline Commenting
Action Items – Like, Comment, Repost, Save this, Stop Following
Other Connection Component Updates – blogs, wikis, etc.
EE - actions items, forum replies etc.
3 Updates Views – I'm Following, Status Updates, Discover
Others Views - @mentions, My Notifications, Action Required, Saved
9. How Its Implemented
Activity Stream Standard - http://activitystrea.ms/
Used by
– IBM
– Google
– Microsoft
– Opera
– MySpace
– To name a few...
Exposed as an Open Social Gadget
12. Authentication
Anonymous access
For public data, some APIs are available at an anonymous URL,
where no authentication challenge is performed
<server>/connections/opensocial/anonymous/rest/activitystreams/@
me/@all
Form Based Authentication
Authentication used by browser URLs (where the user is redirected to
the login page)
Ajax applications also use this when accessing APIs in order to take
advantage of the available session information
Complex login redirect handing is however required
Not recommended or supported for third party applications
<server>/connections/opensocial/rest/activitystreams/@me/@all
13. Authentication
Basic Authentication
Needs Base-64 encoded header for the username and password
This should always be done over https (avoid cleartext passwords)
Most HTTP libraries support setting basic authentication headers
<server>/connections/opensocial/basic/rest/activitystreams/@public/
@all
OAuth Authorisation
Is an authorisation (rather than authentication) mechanism
You can authorise a service to act on your behalf without giving them
your credentials
<server>/connections/opensocial/oauth/rest/activitystreams/@public/
@all
14. 3rd
Party Events
Can POST any event to the stream of the current user
– /connections/opensocial/rest/activitystreams/@me/@all
Main details are -
– actor : Connections or External Id
– verb : from a set list
– title : Connections will generate if needed
– content : for display of event details
– updated : event time
– object : details on the object including title, id etc.
– connections : a grab bag of connections specific properties that add
more information
15. HTML Formatting
No Active Content – ACF run on all fields
title – Allows anchor tags only
content, object.summary – Allows following tags
– <a> <b> <blockquote> <br> <caption> <cite> <code> <col>
– <colgroup> <dd> <dl> <dt> <em> <i> <img> <li> <ol> <p>
– <pre> <q> <small> <strike> <strong> <sub> <sup> <table>
– <tbody> <td> <tfoot> <th> <thead> <tr> <u> <ul>
Style limitations
– Images given max-width of 100% (of the item container)
– Tables given simple 1px border
– Vertical whitespace (newlines, paragraphs) collapsed
16. Generator
Identifies the source of the entry
Can be used to request filtered feeds
Can specify details in entry being posted
"generator": {
"id": "socialConnectVI",
"image": {
"url": "http://ebmedia.eventbrite.com/s3-
build/images/6261669/36270708046/1/logo.png"
},
"displayName": "Social Connect VI",
"url": "http://socialconnections.info/events/social-connections-vi"
}
The image, if provided, is displayed in stream. Should be 16x16
17. Generator – registration
Applications can be registered
(NewsActivityStreamService.registerApplication())
Provide following details:
– appId, displayName, url, secureUrl, imageUrl, secureImageUrl, summary
– NewsActivityStreamService.registerApplication("socialConnectVI", "Social Connect VI",
"http://socialconnections.info/events/social-connections-vi/", "https://socialconnections.info/events/social-
connections-vi/", "http://ebmedia.eventbrite.com/s3-build/images/6261669/36270708046/1/logo.png",
"https://ebmedia.eventbrite.com/s3-build/images/6261669/36270708046/1/logo.png", "Best Conference
EVER!", "true")
Benefits:
– Post events with just appId for generator
"generator": {
"id": "socialConnectionsVI"
}
– ImageUrl or SecureImageUrl choosen appropriately for feed
– Filter displayed in ActivityStreams in Connections
18. File Item
Use objectType: “file” for entry that denotes a file
{
"actor": {
"id": "@me"
},
"verb": "post",
"title": "${Actor} has uploaded ${Object} to <a href='#'>SlideView</a>",
"object": {
"summary": "",
"objectType": "file",
"id": "slide001",
"fileUrl": "http://SocialConnectionsVI.com/ASIntegration.odp",
"displayName": "ASIntegration.odp",
"url": "http://SocialConnectionsVI.com/viewSlide?deck=ASIntegration.odp"
}
}
19. File Item
Can also add preview image
"object": {
...
"image": {
"url": "http://SocialConnectionsVI.com/getThumb?deck=ASIntegration.odp"
}
}
20. Embedded Experience
Provide extra detail and embedded functionality for your ActivityStream entry
Displayed in popup when entry is clicked in the stream
Defined in entry.opensocial.embed
Two types supported:
– OpenSocial gadget
– URL*
21. Configuration
Development
Edit the opensocial-config.xml file in the LotusConnections-config
directory. Set the whiteListEnable attribute of gadget-settings to "false".
Any Gadget can now be placed into the stream. This is not secure
enough for a production environment. However, it is suitable for a
development server.
<security whitelistEnabled="false" featureAdminEnabled="true">
With this setting in place, you can now post any event into the Activity
Stream referencing any Gadget, and the Gadget will be rendered.
Note : You should be checking the file out to do this, but if you are on a
single node you can edit the file directly and restart the server.
22. Configuration
Enabling developers on a production server
Where a server is required for both production and development the
server admin can enable a development page and a number of hosts
who have the authority to deliver Gadgets.
You will need to edit the opensocial-config.xml file in the
LotusConnections-config directory
You should set the enabled attribute of developer to "true". You can
then use the developer page to test Gadgets.
http://<myserver>/connections/resources/web/com.ibm.lconn.gadget/
test/bootstrap.html
<developer enabled="true" allowSSOFeature="true" allowIntranetProxyAccess="true">
23. EE - OpenSocial Gadget
Need to provide gadget and context when posting entry
"opensocial": {
"embed": {
"gadget": "http://SocialConnectionsVI.com/gadgets/slideview.xml",
"context": {
"deck": "ASIntegration.odp"
}
}
}
gadget – URI to the gadget definition
context – Anything you want
Gadget must be registered – via Homepage Administration UI or
wsadmin commands
– Gadgets that are not registered will be ignored, and a generic EE
from Connections is used
Typically, gadgets will use OAuth authentication to load data from
application
24. EE - URL
Provide url when posting entry
"opensocial": {
"embed": {
"url": "http://SocialConnectionsVI.com/ee/viewSlide?
deck=ASIntegration.odp""
}
}
There is no context supported, but contextual data can be
passed in URL
URL must be whitelisted (via opensocial-config.xml)
– URLs that are not whitelisted will be ignored, and generic EE
from Connections is used
25. Rollup
In order to address the scenario where a user posts a file and 200
people 'like' it, filling up their Activity Stream, rollup needs to be
performed. This means
– Only the latest event on any given object is shown
– The 2 most recent comments are returned.
We support the ?rollup=true flag on retrieval for specifying that a
rolled up feed is required.
In order to provide for rollup, simply add the following (by default, the
object id will be used)
"connections": {
"rollupid": "3d7638dd-b5e1-4d52-a03d-83591996da20"
},
26. Templated titles
Connections allows for the introduction of two kinds of title template
– Object substitutions - where a referenced object within the event is substituted into
the title.
– Title template substitutions - using object substitutions, providing a complete title
27. Templated titles
Object Substitution - A number of substitution values are supported
within a submitted event.title. These are specified using the ${}
marker.
– ${Actor} - this is converted into appropriately marked up HTML which displays the
Actors name and links to a Business Card corresponding to the Actor
– ${Object} - for person objects as per Actor above, otherwise the displayName with
a link to the url
– ${Target} - for person objects as per Actor above, otherwise the displayName with
a link to the url
Title Template Substitution
– ${add}=${Actor} added ${Object}.
– ${create}=${Actor} created ${Object}.
28. Distributing events
By default most users do not have the authority to distribute events to
another users stream. If they did then this would mean that any user
would have the ability to spam indiscriminately.
Although the ability to distribute can be opened up via configuration to
any user, there is some basic distribution allowed for any user.
– To [UserID] where the user in question is the current user
– To @me which resolves to the same thing
– To @public which means the event will appear on everyones discovery tab - but
this is only permitted if the submitting user is also the actor in the event
– To [CommunityId] where the current user is a member of that community or the
community is public - again this is only permitted if the submitting user is also the
actor in the event.
In order do distribute any event to any user, the distributing user
needs to be in the appropriate J2EE Role.
36. Notes
Heavily Integrated within Notes
Activity Stream gadget can live in multiple places
– AS gadget in narrow mode on side bar
– AS gadget in full mode within it's own window
Multiple Embedded Experience gadgets used also
– Repling to Forums
Context Menu Actions and Controls
37. Portal
Fully functional Activity Stream able to live anywhere inside Portal
Can be associated to user's I'm Following or to a community
Portal_AS_Integration.mp4
Video with presentation's zip on IBM Greehouse here
38. Life in 3rd
Party Apps
Activity Stream OSG can be loaded into any Open Social Container
Also the Connection's EEs could be leveraged
Notes is an example of this
All of this could be integrated with 3rd
Party Event + EEs
Living in 3rd
Party applications
39. Conclusion
With more relevant Content
And located in related areas of products
Will push more traffic into Connections
And begin to leverage it's full potential
Can have you own Activity Stream wherever you want