+ All Categories
Home > Technology > How to access the Activity Stream in IBM Connections

How to access the Activity Stream in IBM Connections

Date post: 12-May-2015
Category:
Upload: ibm-connections-developers
View: 3,195 times
Download: 1 times
Share this document with a friend
Description:
How to access the Activity Stream in IBM Connections Speakers: Bill Looby, IBM, Social Software Architect Francis Moloney, IBM, Software Engineer Social Business Toolkit The Activity Stream represents an open, implementation independent, standardized means of aggregating events from multiple sources. In order to provide real value, these sources must be in a position to push events easily into the stream. In this webinar we demonstrate the the data model used to post events to the stream along with the use cases associated with doing so. We also show the value of the Social Business Toolkit in simplifying this task and improving productivity. IBM Social Business Toolkit: http://ibmdw.net/social
Popular Tags:
28
Accessing the Activity Stream in IBM Connections How best to access and some common usage patterns. Bill Looby, Social Software Architect, IBM Connections IBM SBT Webinar 08/28/13 Francis Moloney, Software Engineer, Social Business Toolkit
Transcript
Page 1: How to access the Activity Stream in IBM Connections

Accessing the Activity Stream in IBM Connections

How best to access and some common usage patterns.

Bill Looby, Social Software Architect, IBM Connections

IBM SBT Webinar 08/28/13

Francis Moloney, Software Engineer, Social Business Toolkit

Page 2: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation2

Future Webinars

Tentatively:● September 25th: Development Environments – Quick Start Image, IBM

Greenhouse, IBM SmartCloud for Social Business

Page 3: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation

IBM Connections App Dev Contest

● http://connectionscontest.openntf.org

● Chance to win 5 x $1000

● Submit your open source project until November 3rd

● All types of OpenNTF projects can be nominated that utilize IBM Connections

● Developers can use a free shared development environment in the cloud

Page 4: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation4

Disclaimers

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.

Page 5: How to access the Activity Stream in IBM Connections

Using the Social Business Toolkit

Demo

Page 6: How to access the Activity Stream in IBM Connections

Activity Stream Events

The Basics

Page 7: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation7

A simple event

URLhttp://.../activitystreams/@me/@all

Header Content-Type : application/json

Content{ "actor": { "id": "@me" }, "verb": "share", "title": "${share}", "object": { "summary": "A totally new way of looking at things", "id": "thisid", "displayName": "Something Interesting", "url": "http://w3.ibm.com" },}

Page 8: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation8

Adding a generator

Content { "generator": { "image": {"url": "http://.../...news.png"}, "id": "DemoApp1", "displayName": "Demo Application", "url": "http://www.ibm.com/" }, "actor": { "id": "@me" }, "verb": "share", "title": "${share}", "object": { "summary": "A totally new way of looking at things", "id": "thisid", "displayName": "Something Interesting", "url": "http://w3.ibm.com" }}

Notes :● The icon is displayed scaled down● The generator name is displayed on hover

Page 9: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation9

Adding a comment

Content{ "actor": {...}, "verb": "comment", "title": "${comment}", "object": { "summary": "This is definitely interesting", "id": "commentid", "objectType": "comment", "displayName": "Definitely interesting", "url": "http://w3.ibm.com" }, "target": { "summary": "A totally new way of looking at things", "id": "thisid", "displayName": "Something Interesting", "url": "http://w3.ibm.com" }, "connections": { "rollupid": "thisid" }}

Notes :● The Target is the previous Object !● The rollupid is needed so we know not to

display separately● The objectType is key for embedded display

Page 10: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation10

Adding some formatted text

Content { "actor": { "id": "@me" }, "verb": "share", "title": "${share}", "content":"<table><tr><td><i>Click on this entry to launch the embedded experience and see details and event history<p/><b>Note :</b> This is the default experience</i></td><td><img src=\"http://inspirationalgadget.googlecode.com/svn/trunk/images/misty.jpg\"></td></tr></table>", "object": { "summary": "A totally new way of looking at things", "id": "thisid", "displayName": "Something Interesting", "url": "http://w3.ibm.com" }}

Notes :● We display both content and object summary● We filter trim all HTML for security and display

reasons.

Page 11: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation11

And adding an embedded experience

Content { "actor": { "id": "@me" }, "verb": "share", "title": "${share}", "content":"...", "object": { "summary": "A totally new way of looking at things", ... }, "openSocial": { "embed": { "gadget": "http://inspirationalgadget.googlecode.com/svn/trunk/wisdom.xml", "context": {"id":"12345"} } }}

Page 12: How to access the Activity Stream in IBM Connections

Integrating a Travel Website

Page 13: How to access the Activity Stream in IBM Connections

Basic requirementsUse Cases

● Public News● Huge discounts on SmartStay hotels

● Actions● Your flight has been rescheduled. Please

approve or cancel● Follow travel topics

● Train strike in Italy● Follow people travelling

● John Smith has recommended travelling in France

● Travel Community● We now support TopHotels in Australia

Things to consider

● Who is sending the event ?● What id is used ?

● Who is the actor ?● Is there one clearly defined ?

● What is the main 'object' ?● Is it a country ? An airline ? A trip ?

● Who should receive the event ?● . . . and is it public

● What do I want to say in the event ?● . . . and how much detail will I provide ?

Page 14: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation14

Public News : Huge Discounts on SmartStay hotels

● Who is sending the event● We want this to be public, so it has to be a

trusted user* or the actor.● Who is the actor

● Most likely it is a System User called 'Travel System as there is no real user.

● What is the main 'object'● If you want to roll up news (i.e. show only the

latest on this topic) keep track of the topic.● Who should receive the event

● @public● What do I want to say in the event

● As much as you like, but it's best to show an interesting summary and provide a link back to the travel app for the full story

* A trusted user is any user in the trustedExternalApplication role.

URLhttp://.../activitystreams/@public/@all

Content{ "actor": { "id": "userIdForTravelSystem" }, "verb": "post", "title": "${post}", "object": { "summary": "Huge discounts are currently available on SmartStayHotels. Book soon !", "id": "smartstay:123", "displayName": "SmartStay Discounts", "url": "http://www.aroundtheworldsample.com/123" },}

Page 15: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation15

Public News : Huge Discounts on SmartStay hotels

● The event appears under discover● If you want it on a users stream aswell,

you will need to distribute to both.

● The image for the Travel System user appears.● You will need to create this user● You should also assign them the

trustedExternalApplication rôle (you'll need this later)

● The title is 'SmartStay Discounts'● You could add more meaning but you may

want to roll up discounts on SmartStay hotels together.

Page 16: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation16

Actions : Your flight has been rescheduled

● Who is sending the event● This is a private event, so you can send as a

system user or using Oauth, authorised to access the users stream.

● Who is the actor● Most likely it is a System User called 'Travel

System as there is no real user.● What is the main 'object'

● A 'travel plans' object.● Who should receive the event

● The relevant user● What do I want to say in the event

● Either provide a link or ideally an embedded experience.

URLhttp://.../activitystreams/<userid>/@all

Content{ . . . "verb": "update", "title": "${update}", "object": { "summary": "Your flight has been rescheduled", "id": "travel:123", "displayName": "Travel to Madrid", }, "openSocial": { "embed": { "gadget":\ "http://.../travel.xml", "context": {"id":"travel:123"} } }, "connections": { "actionable": true }}

Page 17: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation17

Actions : Your flight has been rescheduled

● The event appears under Action Required in the users stream● It will also update the 'badge'

● The example shown uses simple links● These could link to the Travel System

page for accept or cancel

● However these aren't needed if you have the EE● On click, a user can be shown more

information and given accept and cancel buttons.

Page 18: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation18

Follow travel topics : Train strike in Italy

● Who is sending the event● This event is likely going to multiple users

(anyone following) so a trusted sender should be used

● Who is the actor● Whoever is updating the followed object (e.g.

The poster if this is a post on an Italy travel forum)

● What is the main 'object'● A 'Travel in Italy' travel object.● Depends how you want to roll up

● Who should receive the event ● Anyone following the Italy travel object *

● What do I want to say in the event● The news details

URLhttp://.../activitystreams/<userid>/@all

Content{ "actor": { "id": "userIdForTravelSystem" }, "verb": "update", "title": "${update}", "object": { "summary": "Train Strike in Italy", "id": "smartstay:123", "displayName": "Travel in Italy", "url": "http://www.aroundtheworldsample.com/123" },}

Page 19: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation19

Follow people travelling : John Smith has recommended travel in France

● Who is sending the event● Either a trusted user or John Smith (we'll be

sending a public event)● Who is the actor

● John Smith● What is the main 'object'

● A 'France' travel object.● Who should receive the event

● Send to @public – connections will distribute to John Smiths followers

● Can send to any followers of 'Travel in France' also

● What do I want to say in the event● A summary of the travel in france object

should be enough.

URLhttp://.../activitystreams/@public/@all

Content{ "actor": { "id": "userIdForAroundTheWorld" }, "verb": "like", "title": "${like}", "object": { "summary": "Travelling in France in 2013", "id": "smartstay:123", "displayName": "Travel in France", "url": "http://www.aroundtheworldsample.com/123" },}

Page 20: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation20

Travel community : We now support TopHotels in Australia

● Who is sending the event● This event is going to a community so

although any member can send an event (as long as they are the actor) a trusted sender should probably be used

● Who is the actor● You could be forwarding user actions of

interest to a community, or general travel information

● What is the main 'object'● An 'Hotels in Australia' travel object possibly.● Depends how you want to roll up

● Who should receive the event ● The community. Connections will distribute to

anyone following the community● What do I want to say in the event

● The news details

URLhttp://.../activitystreams/<communityid>/@all

Content{ "actor": { "id": "userIdForTravelSystem" }, "verb": "update", "title": "${update}", "object": { "summary": "Hotels in Australia", "id": "smartstay:123", "displayName": "We now support TopHotels in Australia. You can book through normal chanels", "url": "http://www.aroundtheworldsample.com/123" },}

Page 21: How to access the Activity Stream in IBM Connections

Some practical considerations

Page 22: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation22

Using a system user to access

● Oauth allows us to access on behalf of every user individually● Could access for each user● But this tends to be impractical and

slow

● More practical to create a User to send events● . . . can work quite well as an Actor● . . . you get to look at the profile● . . . and the user can be followed

Page 23: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation23

Distributing events

● Typically, an event can be sent to . . . ● @public – if anyone can see and

should be able to discover● A set of users who have recorded an

interest in the object● A user at whom the event is actually

directed (this is generally the only recipient)

● Any associated community (if there is a means of expressing that association)

{openSocial : { "deliverTo":[ {"objectType":"person", "id":"thiscompany:id"}, {"objectType":"person", "id":"@public"}, ]}, "verb":"post", ... }}

Page 24: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation24

Batching events

● For performance reasons it's generally more efficient to send a number of events at once.

● This can be done by sending all the events in a single array.

● Typically this is easier to do as a trusted user as you may be sending to multiple streams.

[ {"actor":{"id":"abc"}, "verb": "post", "object":{"id":"a"}, }, {"actor":{"id":"abc"}, "verb": "share", "object":{"id":"b"}, }, {"actor":{"id":"xyz"}, "verb": "update", "object":{"id":"b"}, }]

Page 25: How to access the Activity Stream in IBM Connections

Activity Streams and Microblogging

Page 26: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation26

Comparing Activity Streams and Microblogging

● Activity Streams don't 'own content● Activity Streams don't support their

own commenting and recommendations

● Activity Streams use the Activity Stream API to POST

● Activity Streams use the Activity Stream API to GET

WikisBlogsOthers

AS API

● Microblogging owns content● Microblogging supports comments

and recommendations● Microblogging use the Microblogging

API to POST● Microblogging use the Activity Stream

API to GET

Ublog

Ublog API

AS API

Page 27: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation27

Resources and Questions

● Home page: http://ibmdw.net/social● SDK: http://ibmsbt.openntf.org● GitHub: https://github.com/OpenNTF/SocialSDK● StackOverflow: #ibmsbt● Twitter: @ibmsbt● YouTube: http://youtube.com/ibmsbt● Playground: http://bit.ly/sbtplayground

Page 28: How to access the Activity Stream in IBM Connections

© 2013 IBM Corporation28

Acknowledgements and Disclaimers

© Copyright IBM Corporation 2013. All rights reserved.– U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with

IBM Corp.

IBM, the IBM logo, ibm.com, Rational, the Rational logo, Telelogic, the Telelogic logo, Green Hat, the Green Hat logo, and other IBM products and services are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtmlOther company, product, or service names may be trademarks or service marks of others.

Availability: References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates.

The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.


Recommended