Unraveling Multimodality with Large Language Models.pdf
Suguk activity feed
1. SharePoint 2010
extending the activity feed
Wes Hackett
Principal Solutions Architect at Content and Code
wesley.hackett@contentandcode.com
@weshackett http://weshackett.com
2. agenda
introduction
out of the box
architecture
development
extensibility
known issues
questions
useful links
4. introduction
aims of this session
examine the native SharePoint 2010 activity
feed
describe how to extend it with custom
activity types
walkthrough a demo scenario
6. out of the box
activity feed types
consolidated
the consolidated feed is all the activity events being generated by colleagues
shown on the Newsfeed page
published
The published feed is all the activity events generated by that individual
shown on the profile page
7. out of the box
newsfeed page
newsfeed page
this is a picture of the native newsfeed
page
8. out of the box
activity types
new membership
sharing interests
tagging by my colleague
note board post
tagging with my interests
rating
status message
new colleague
9. out of the box
activity types continued
job title change
manager change
new blog post
workplace anniversary
profile update
upcoming birthday
birthday
upcoming workplace anniversary
10. out of the box
atom feeds
consolidated
the consolidated feed are all the activity events being generated by colleagues
http://<MySiteHost>/_layouts/activityfeed.aspx?consolidated=true
published
the published feed are the activity events being generated by an individual
http://<MySiteHost>/_layouts/activityfeed.aspx?publisher=<accountname>
no web services
11. out of the box
Outlook 2010 integration
Outlook 2010 has the ability to display the
SharePoint Activity Feed
configure using the Outlook 2010 Social
Connector
17. scenario
suggestions box
allow a user to make a suggestion on a site
promote this suggestion to their colleagues
NB: code example only NOT production
ready
18. scenario
architecture
user profile
gatherer web part
timer or
jobs ATOM
activity
social object user profile
model
suggestions
user
suggestions gatherer
interface
list source timer
job
19. scenario
some prep
content type and site columns
provides structure to the data
list definition
provides a type of list with the content type and event receiver pre-bound
list instance in a site
provides an instance for users to add suggestions
20. scenario
solution overview
list event receiver
this registers items for processing by the timer job
one technique, others might use SPQuery or change log approaches
timer job
processes the work items and passes them into the custom gatherer
use a timer job for scale and security reasons, native approach
custom gatherer
this is the element where activities are handled
also registers and unregisters the custom activity application
21. scenario
list event handler
item added event
creates a ScheduledWorkItem with the
information about the list item
you can confirm it has worked by checking the
Content database table ‘ScheduledWorkItems’
22. scenario
Activity application
register the Activity Application
register the Activity Types
add activity templates
Farm scoped feature
needs to be admin on the UPA
23. scenario
timer job
adds each work item into the gatherer
responsible for repeating the processing
logic on a schedule
24. scenario
custom gatherer
provides the SPListItem to ProcessingItem
conversion
provides the create activity event from
ProcessingItem
publishes the activity events
publishes the activity events to the authors
colleagues
26. known issues
it isn’t Facebook
missing methods
most of the ‘remove’ methods have not been implemented
eg. ActivityApplicationsCollection.Remove throws an exception ‘NotImplementedException’
permissions
some actions require an elevated state
ActivityEvent.CreateActivityEvent method requires ‘Full Control’ to the UPA
no ‘likes’ and ‘comments’
there is no API in place to support ‘likes’ and ‘comments’ a-la Facebook
restrictive API means to create advanced functionality needs other services
29. useful links
root of the MSDN namespace reference
bit.ly/Ae6hAP
index of the SharePoint SDK articles
bit.ly/pn8t24
extending Activity Feed with ECM data
bit.ly/kWujgL
the native templates
bit.ly/zQC6K9
Notas del editor
Introduce myself:Wes HackettPrincipal Solutions Architect at MS Gold Partner based in London
Run through the agenda itemsIntroduction > explanation of this sessionOut of the box > describing the out of the box behavioursArchitecture > describing the elements to the system and where a customisation fitsDevelopment > what tools and assemblies are involvedExtensibility > how to go about adding a new customisationKnown issues > covering off the known problems with the APIQuestions > Ask anything you wantUseful links > Some short links to useful information
In this section I’ll give a quick run down of this session
In this session I aim to provide the following:An overview of the native SharePoint 2010 activity system, what it is, how it worksDescribe how to extend it with your own custom activity itemsWe’ll be doing this by walking through a demo scenario
In this section I’ll describe what features come with SharePoint 2010
There are two types of activity feed views in SharePoint 2010:ConsolidatedThis shows the items being generated by your colleague networkPublishedThis shows activities by the individual
This is view of the Consolidated feed which lives on the NewsFeed page in the MySite host
Natively the activity system provides mainly Social and tagging activityNew membershipsSharing interestsTagging by a colleagueNote board postsTagging with my interestsRatingStatus messageNew colleague
Natively the activity system provides mainly Social and tagging activityJob title changeManager changeNew blog post (only if you created the blog using mysite.aspx?blog=1)Workplace anniversaryProfile updateUpcoming birthdayBirthdayUpcoming workplace anniversary
There are two ATOM feeds for the systemConsolidated which provides items for the colleagues of the calling userPublished which shows the items for the specified accountThere are NO WEB SERVICES
The Activity System also integrates into Outlook via the Social Connector.Items show up in the pane below a user in the main pane
In this section I’ll give a quick run down of the systems existing architecture
Explain each elementProfile DB holds the profile change logSocial DB holds the tagging, rating change logGatherer timerjobs, one for profile, one for socialPushes the data back into the Profile database via the APIWeb Part of ATOM page call the API to get Consolidated or Published item feeds
In this section I’ll give a quick run down of things you need to be able to extend the system
Tools you’ll needVisual Studio 2010CKSDevAssembliesMicrosoft.Office.ServerMicrosoft.Office.Server.UserProfiles
In this section I’ll go through a demo scenario
Scenario introductionSo for the purpose of an example we have been asked to provide the following functions:Provide a mechanism for a user to submit a suggestionPromote this suggestion to their colleaguesWord of warning, this code is NOT production ready and is to highlight the main Objects and Techniques you can use only.
As you can see the new extension slots in alongside the OOTBThe two elements are:Suggestions list event receiver > this adds a work item into the SPSite Work Items list for the new list itemTimer job gatherer > This reads the SPSite Work Items and processes them into Activity Events
So before we can dive into the Activity Extensions there is some plumbing neededThere is a new custom content type ‘Suggestion’ with a custom site column ‘Suggestion Details’There is then a list definition which is based off this content type to give us a repeatable method of providing ‘suggestion’ functionalityAn instance of this list in the siteWe won’t go through the code etc for this but it is in the solution
So lets take a closer look at how the solution is built upList event receiver to create work items for later processingThis is done for scaleThis could be replaced with some form of query within a timer job such as SPQuery or SPSiteDataQueryCould also use the change log to find changes to processTimer jobThis is the processing schedule for converting the work items into activity eventsThis is how the native functionality is invokedScales wellCustom gathererContains all the logic to create the work items for the publisher and colleaguesContains all the logic to register and unregister the activity application, activity types, activity templates
The list event handler is used to register the new item for later processingFires on Item Added event so we can generate new activity whenever a user adds a suggestionIt uses the ScheduledWorkItem approachYou have to elevate to be able to submit a new work item unless the user is a site collection administratorYou can check its working by opening the ScheduledWorkItems table in the content database. Obviously this is only for dev….
Activity ApplicationThis is the main container to register your types againstActivity TypesThese are the different types of activities that you wish to create such as ‘Colleague added’It makes the link to the resource string containing its name (used in the EditDetails.aspx)Holds a collection of Activity TemplatesActivity TemplatesThe template defines how the data will be displayedIt can be single or multi-valueSingle has a format which shows only one itemMulti uses a list of items and can display themTemplates are driven by a token approach which the web part will use
It takes the work items and passes each one to the gatherer for conversion into a ProcessingItemThen calls create events once all its work items collection has been processedThe timer job is there to provide a scheduled process
Provides a method to convert the list item to a processing itemDone to release the SP objects quicklyProvides a method to create a new Activity Event based on the information in the ProcessingItemProvides a method to publish activity events created by the item authorProvides a multi-cast method to push these activities to all the authors colleagues
In this section I’ll cover the limitations of the current version of the API
So this version is a great start but it isn’t perfect:Several of the important methods are missing:There is no API support for removing a customisation such as custom activity application and typesThere is no API support for removing individual items, so if someone posts a status that needs removing you have no officially supported means of removalPermissions:Some of the API actions require elevation and ‘Full Control’ permissions on the User Profile Service applicationNo likes and comments by defaultThe API doesn’t support this so if you want it you need to bespoke it
In this section please feel free to ask questions
In this section I’ll cover useful links that provide further work