1

In IBM Connections 4.0 and 4.5, I'm trying to make a custom Java app imitate much of the activity-stream behaviour of the Activities app.

The Java code uses the Social Business Toolkit to post to activity streams, and authenticates as a user that has access to post to other users' streams, but I'm also testing with RESTClient in Firefox while logged in as the same special user.

The Activities app sometimes does the following things, which I can't figure out how to do:

  • Posts to a user's "My Notifications" view; and
  • Posts to a user's "Action Required" view without the post also appearing in "I'm Following".

How do I achieve these things?

For the first item, I've tried posting to "http://server.company.net.au/connections/opensocial/basic/rest/activitystreams/UserId/@responses/@all", but that doesn't work as desired. The event always appears in "I'm Following" when I want it to appear in "My Notifications".

Additional note regarding "My Notifications":
One of several events I'm trying to imitate is the notification to a person that they were added to an activity. In attempting to create the notification, I have added a person to an activity, logged into Connections as that person, copied the JSON from their "My Notifications" stream, then posted one of those events back to that person's stream with the bare minimum of changes required to make Connections accept it.
No matter what group I post to (such as @responses), the event I've created always appears in "I'm Following" despite the original being in "My Notifications".

For the second item, I have got events to appear in "Action Required" by setting the actionable flag in the JSON data, but those events also appear in "I'm Following" when I don't want them to do so.

Scott Leis
  • 2,810
  • 6
  • 28
  • 42

1 Answers1

3

There is the actionable events component http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Support_for_Saved_and_Actionable_events_ic45&content=pdcontent

You'll need to use the connections extensions to the data model.

"connections": {
"actionable": "false",
"broadcast": "true",
"rollupid": "87d7a7fb-af22-403b-ab0d-d101d9caac4f",
"saved": "false",
"canUnFollow": "true" 
}, 

For my notifications, I suggest you look at the data model of the other events already posted, such as a File share. These are generally events related to things created in a connections service... use the link

https://SERVERNAME/common/opensocial/basic/rest/activitystreams/@me/@responses/@all?shortStrings=true&format=json

to grab the fields you need from "connections"

You can also look at Data Model

The following describes the fields. Extensions Overview

Paul Bastide
  • 1,505
  • 4
  • 17
  • 22
  • Upvote for your last two links, which I hadn't seen, but not the answer. As originally stated in the question, I already know about the actionable flag, but I can't seem to produce the same result that the Connections Activities app produces (making an event *only* appear in "Action Required"). I'm also still unable to produce an event in "My Notifications" despite matching an existing event's data structure as closely as possible. – Scott Leis Mar 25 '14 at 01:23
  • I suggest looking at the Acme Airlines sample in the SBTSDK. it is setup to make a call that shows only in action required. to be more specific - reference line 37 - https://github.com/OpenNTF/SocialSDK/blob/master/samples/j2ee/acme/acme.social.sample.webapp/src/main/webapp/js/activitystream.js – Paul Bastide Mar 25 '14 at 11:41
  • I've had a look at that and made a few changes to my JSON and other bits of code (including calling a single-argument version of `ActivityStreamService.postEntry` - I had been using a four-argument version), but I still get every "Action Required" entry also appearing in "I'm Following". I've decided this isn't important enough to pursue further. – Scott Leis Mar 27 '14 at 00:28