SlideShare una empresa de Scribd logo
1 de 21
BCS, REST and Subscriptions
What is it and how to get it working!
Chris Givens, CEO ACS
San Diego SPUG - www.sanspug.org
Background
• BS Computer Science, Math, Business
• 5 years at IBM in Sales and Distribution
• 10 years in Seattle at various startups
– Large volume transaction processing (Credit, Debit, Loyalty)
• Microsoft Certified Trainer (MCT) since 2007
– CISSP, CCNP, JAVA, MCSD, SharePoint 4x
• CEO ACS, leading SharePoint courseware provider to
Microsoft Certified Training centers
– Top selling titles in Development, BI and Search
• SharePoint Sr. Architect
– eBay
– General Atomics
What led to this session?
• MOC Course 20489
– Advanced Development with SP2013
• Module 9 – “Working with Business
Connectivity Services”
– No documentation (“that works”)
– No one has ever done this (outside PG)
• Also led to posts on this subject on
MSDNMSPress and my blog
Business Connectivity Services
• Service application that allows
– External lists
– BDC Columns
– Indexing search content
• Custom BCS Connectors allow SharePoint to
index ANYTHING
– Yes, anything!
ODataREST
• A simple approach at exposing APIs using
common standard such as HTTP and REST
– http://developer.cbssports.com/documentation
• End points define the entities and methods
you want to call
– /stats
– /add_drop
• Parameters typically passed in the query string
– POST data will be in body
Subscriptions
• Subscriptions allow SharePoint to be notified
when external data changes
– Adding
– Modifying
– Deleting
• Event receivers have been around since 2003
– 2003 – only one - Recycle Bin
– 2007 - Event Receivers
– 2010 – More receivers added (no support for external
lists)
Subscription Methods
• Two new BDC stereotyped methods
– EventSubscriber
– EventUnsubscriber
• Methods can be implemented in various ways:
– Database (Scot Hillier was 1st)
– OData (CJG was 1st )
• These are in addition to the CRUD methods
– CRUD methods easily created using SP Designer
for database or Visual Studio with REST wizard
BDC Model Method
Properties
• Subscription
– IsDeliveryAddress – the delivery address to send
to the external system
– IsEventType – the type of event
• Unsubscribe
– SubscriptionIdName – The external systems
subscription id
BDC Model Method
Attributes
• ODataEntityUrl
– Suffix of rest end point
• ODataHttpMethod
– GET, POST
• ODataPayloadKind
– http://msdn.microsoft.com/en-
us/library/microsoft.data.odata.odatapayloadkind%28v=vs.113%29.aspx
• ODataFormat
– Content-type header (application/json;odata=verbose)
– Based on the external system end point json support
– OData Version 2 vs 3 (visual Studio wizard)
• ODataServiceOperation
– ???
• NotificationParserType
– Defines the class that will handle the parsing of the external message
Implementing
External System Support
• OData generated services will not have the
methods necessary to support notifications
– You must add them (Subscribe and Unsubscribe)
• This is tricky
– OData Service uses its own HTTP request handling
mechanism
– Request body is not available in your method
– Expect to pass method parameters in the query
string, not via the body
The Subscription Process
• Subscription list (External Subscription Store)
must be created first
– Created via External Events feature
(BCSEvents, ExternalSubscription)
– Hidden list in _private/ExtSubs
• SharePoint calls subscribe method
– Method returns SubscriptionId
• Subscription list item is created with
subscription information
Creating Subscriptions
• You can do this in three main ways
– Explicitly call the Subscribe method
(Server, Client, JSOM)
– Create an alert
• Very easy to do this for testing
• Ensure you setup the outgoing email settings
– Create an event receiver
• Some things get cached in the event receiver
registration
• Requires you to remove and re-add
Watch Out!
• You web method code may execute
successfully, but the http response may fail!
– In this case, you have to handle the exception and
remove the subscription in your code
• OData DataService implemented as custom
IRequestHandler
– Override HandleException method
• Also prevents getting the httprequest body
Supported Event Receivers
• Subscriptions can be one of three types
– ItemAdded (1)
– ItemUpdated (2)
– ItemDeleted (3)
• Cancel events are not supported
– ItemAdding, ItemUpdating, ItemDeleting
– No application domain that would wrap the two
systems (EAI concepts)
Message Formats
• NotificationParserType
– IdentityParser
• /a:feed/a:entry/a:content/m:properties/b:BcsItemIdentity
• Very simply event has occurred…no changed data
– ODataEntryContentNotificationParser
• /a:entry/a:link/m:inline/a:entry
• Includes changed data
– Custom
• Inherit from abstract class NotificationParser
• Implement the Initialize method
• Why? Change the format to JSON rather than ATOM
• Except for the XPath, everything is ignored!
Getting the Message
• Event receivers will expose the message sent
from the external system
– Allows for custom processing in your event
receiver
• Property called NotificationMessage
• NOTE: Attempts to get item properties will fail
if the message is improperly formatted
– No parsing on message receive
Demo
• Create a subscription
• Change data
• Debug the event
• Analyze the message
Summary
• It does work! 
• External system must support sending
notifications back to SharePoint
• Message format is very specific
• Ensure subscriptions get created in list
• MSDN Blog
• MSDN Code
Questions?
• What’s on your mind?
Contact
• chris@architectingconnectedsystems.com
• @givenscj

Más contenido relacionado

La actualidad más candente

SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...
SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...
SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...Chirag Patel
 
SPS Reston SharePoint Alwyays On
SPS Reston SharePoint Alwyays OnSPS Reston SharePoint Alwyays On
SPS Reston SharePoint Alwyays OnMike Maadarani
 
SharePoint 2013 i SharePoint Online
SharePoint 2013i SharePoint OnlineSharePoint 2013i SharePoint Online
SharePoint 2013 i SharePoint OnlineDragan Panjkov
 
SharePoint 2013 Admin in the Hybrid World
SharePoint 2013 Admin in the Hybrid WorldSharePoint 2013 Admin in the Hybrid World
SharePoint 2013 Admin in the Hybrid WorldJason Himmelstein
 
How to execute SharePoint 2016 upgrade strategy and ensure business continuity
How to execute SharePoint 2016 upgrade strategy and ensure business continuityHow to execute SharePoint 2016 upgrade strategy and ensure business continuity
How to execute SharePoint 2016 upgrade strategy and ensure business continuitySUGES (SharePoint Users Group España)
 
Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...
Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...
Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...Toni Frankola
 
Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...
Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...
Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...Chirag Patel
 
ECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenarios
ECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenariosECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenarios
ECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenariosEuropean Collaboration Summit
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsSPC Adriatics
 
WISPUG - Fun with SharePoint Migrations
WISPUG - Fun with SharePoint MigrationsWISPUG - Fun with SharePoint Migrations
WISPUG - Fun with SharePoint MigrationsBrian Caauwe
 
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Rencore
 
Product Catalog and IT Service Management
Product Catalog and IT Service ManagementProduct Catalog and IT Service Management
Product Catalog and IT Service ManagementDrew Madelung
 
Building dashboards with Visio Services
Building dashboards with Visio ServicesBuilding dashboards with Visio Services
Building dashboards with Visio ServicesAlan Richards
 
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...NCCOMMS
 
SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...
SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...
SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...Chirag Patel
 
What's New in SharePoint 2016 for End Users Webinar with Intlock
What's New in SharePoint 2016 for End Users Webinar with IntlockWhat's New in SharePoint 2016 for End Users Webinar with Intlock
What's New in SharePoint 2016 for End Users Webinar with IntlockVlad Catrinescu
 
What's new in SharePoint 2016
What's new in SharePoint 2016What's new in SharePoint 2016
What's new in SharePoint 2016Giuseppe Marchi
 
ECS19 - Matthew McDermott - How to Run a Search Project in SharePoint
ECS19 - Matthew McDermott - How to Run a Search Project in SharePointECS19 - Matthew McDermott - How to Run a Search Project in SharePoint
ECS19 - Matthew McDermott - How to Run a Search Project in SharePointEuropean Collaboration Summit
 

La actualidad más candente (20)

SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...
SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...
SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...
 
SPS Reston SharePoint Alwyays On
SPS Reston SharePoint Alwyays OnSPS Reston SharePoint Alwyays On
SPS Reston SharePoint Alwyays On
 
SharePoint 2013 i SharePoint Online
SharePoint 2013i SharePoint OnlineSharePoint 2013i SharePoint Online
SharePoint 2013 i SharePoint Online
 
SharePoint 2013 Admin in the Hybrid World
SharePoint 2013 Admin in the Hybrid WorldSharePoint 2013 Admin in the Hybrid World
SharePoint 2013 Admin in the Hybrid World
 
SharePoint 2016 Upgrade Planning
SharePoint 2016 Upgrade PlanningSharePoint 2016 Upgrade Planning
SharePoint 2016 Upgrade Planning
 
How to execute SharePoint 2016 upgrade strategy and ensure business continuity
How to execute SharePoint 2016 upgrade strategy and ensure business continuityHow to execute SharePoint 2016 upgrade strategy and ensure business continuity
How to execute SharePoint 2016 upgrade strategy and ensure business continuity
 
Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...
Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...
Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...
 
Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...
Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...
Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...
 
ECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenarios
ECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenariosECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenarios
ECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenarios
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
 
ECS19 - Robi Voncina - Upgrade to SharePoint 2019
ECS19 - Robi Voncina - Upgrade to SharePoint 2019ECS19 - Robi Voncina - Upgrade to SharePoint 2019
ECS19 - Robi Voncina - Upgrade to SharePoint 2019
 
WISPUG - Fun with SharePoint Migrations
WISPUG - Fun with SharePoint MigrationsWISPUG - Fun with SharePoint Migrations
WISPUG - Fun with SharePoint Migrations
 
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
 
Product Catalog and IT Service Management
Product Catalog and IT Service ManagementProduct Catalog and IT Service Management
Product Catalog and IT Service Management
 
Building dashboards with Visio Services
Building dashboards with Visio ServicesBuilding dashboards with Visio Services
Building dashboards with Visio Services
 
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
 
SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...
SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...
SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...
 
What's New in SharePoint 2016 for End Users Webinar with Intlock
What's New in SharePoint 2016 for End Users Webinar with IntlockWhat's New in SharePoint 2016 for End Users Webinar with Intlock
What's New in SharePoint 2016 for End Users Webinar with Intlock
 
What's new in SharePoint 2016
What's new in SharePoint 2016What's new in SharePoint 2016
What's new in SharePoint 2016
 
ECS19 - Matthew McDermott - How to Run a Search Project in SharePoint
ECS19 - Matthew McDermott - How to Run a Search Project in SharePointECS19 - Matthew McDermott - How to Run a Search Project in SharePoint
ECS19 - Matthew McDermott - How to Run a Search Project in SharePoint
 

Destacado

5 Steps to Better SharePoint Adoption
5 Steps to Better SharePoint Adoption5 Steps to Better SharePoint Adoption
5 Steps to Better SharePoint AdoptionC5 Insight
 
SPS Nashville - Build It and They Will Come SharePoint 2013 User Adoption
SPS Nashville - Build It and They Will Come SharePoint 2013 User AdoptionSPS Nashville - Build It and They Will Come SharePoint 2013 User Adoption
SPS Nashville - Build It and They Will Come SharePoint 2013 User AdoptionStacy Deere
 
Failure to Connect: Why You're Not Getting More From SharePoint
Failure to Connect: Why You're Not Getting More From SharePointFailure to Connect: Why You're Not Getting More From SharePoint
Failure to Connect: Why You're Not Getting More From SharePointC5 Insight
 
SharePoint User Group Meeting- SharePoint 2013 Search
SharePoint User Group Meeting- SharePoint 2013 SearchSharePoint User Group Meeting- SharePoint 2013 Search
SharePoint User Group Meeting- SharePoint 2013 SearchC/D/H Technology Consultants
 
SharePoint Saturday Cuba
SharePoint Saturday CubaSharePoint Saturday Cuba
SharePoint Saturday CubaChris Givens
 
Shop talk - Project Server 2013
Shop talk - Project Server 2013Shop talk - Project Server 2013
Shop talk - Project Server 2013Chris Givens
 

Destacado (6)

5 Steps to Better SharePoint Adoption
5 Steps to Better SharePoint Adoption5 Steps to Better SharePoint Adoption
5 Steps to Better SharePoint Adoption
 
SPS Nashville - Build It and They Will Come SharePoint 2013 User Adoption
SPS Nashville - Build It and They Will Come SharePoint 2013 User AdoptionSPS Nashville - Build It and They Will Come SharePoint 2013 User Adoption
SPS Nashville - Build It and They Will Come SharePoint 2013 User Adoption
 
Failure to Connect: Why You're Not Getting More From SharePoint
Failure to Connect: Why You're Not Getting More From SharePointFailure to Connect: Why You're Not Getting More From SharePoint
Failure to Connect: Why You're Not Getting More From SharePoint
 
SharePoint User Group Meeting- SharePoint 2013 Search
SharePoint User Group Meeting- SharePoint 2013 SearchSharePoint User Group Meeting- SharePoint 2013 Search
SharePoint User Group Meeting- SharePoint 2013 Search
 
SharePoint Saturday Cuba
SharePoint Saturday CubaSharePoint Saturday Cuba
SharePoint Saturday Cuba
 
Shop talk - Project Server 2013
Shop talk - Project Server 2013Shop talk - Project Server 2013
Shop talk - Project Server 2013
 

Similar a SPSRED - BCS, REST ans Subscriptions

#SPSOttawa introduction to the #microsoftGraph
#SPSOttawa introduction to the #microsoftGraph#SPSOttawa introduction to the #microsoftGraph
#SPSOttawa introduction to the #microsoftGraphVincent Biret
 
SharePoint Saturday Dayton 2012
SharePoint Saturday Dayton 2012SharePoint Saturday Dayton 2012
SharePoint Saturday Dayton 2012Scott_Brickey
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowVincent Biret
 
Oracle Application Express as add-on for Google Apps
Oracle Application Express as add-on for Google AppsOracle Application Express as add-on for Google Apps
Oracle Application Express as add-on for Google AppsSergei Martens
 
#SPFestSEA Introduction to #MicrosoftGraph
#SPFestSEA Introduction to #MicrosoftGraph#SPFestSEA Introduction to #MicrosoftGraph
#SPFestSEA Introduction to #MicrosoftGraphVincent Biret
 
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraphVincent Biret
 
SharePoint Saturday Louisville 2012
SharePoint Saturday Louisville 2012SharePoint Saturday Louisville 2012
SharePoint Saturday Louisville 2012Scott_Brickey
 
HTML5 features & JavaScript APIs
HTML5 features & JavaScript APIsHTML5 features & JavaScript APIs
HTML5 features & JavaScript APIsFisnik Doko
 
Store, Extract, Transform, Load, Visualize. Untagged Conference
Store, Extract, Transform, Load, Visualize. Untagged ConferenceStore, Extract, Transform, Load, Visualize. Untagged Conference
Store, Extract, Transform, Load, Visualize. Untagged ConferenceAni Lopez
 
2 speed it powered by microsoft azure
2 speed it powered by microsoft azure2 speed it powered by microsoft azure
2 speed it powered by microsoft azureMichael Stephenson
 
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
OpenIDM - Flexible Provisioning Platform - April 28 WebinarOpenIDM - Flexible Provisioning Platform - April 28 Webinar
OpenIDM - Flexible Provisioning Platform - April 28 WebinarForgeRock
 
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...Vincent Biret
 
Importance of ‘Centralized Event collection’ and BigData platform for Analysis !
Importance of ‘Centralized Event collection’ and BigData platform for Analysis !Importance of ‘Centralized Event collection’ and BigData platform for Analysis !
Importance of ‘Centralized Event collection’ and BigData platform for Analysis !Piyush Kumar
 
Azure Application insights - An Introduction
Azure Application insights - An IntroductionAzure Application insights - An Introduction
Azure Application insights - An IntroductionMatthias Güntert
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
Himmelstein SP Connections HAD207 SharePoint Logging & Debugging
Himmelstein SP Connections HAD207 SharePoint Logging & DebuggingHimmelstein SP Connections HAD207 SharePoint Logging & Debugging
Himmelstein SP Connections HAD207 SharePoint Logging & DebuggingSentri
 
Building Business Applications in Office 365 SharePoint Online Using Logic Apps
Building Business Applications in Office 365 SharePoint Online Using Logic AppsBuilding Business Applications in Office 365 SharePoint Online Using Logic Apps
Building Business Applications in Office 365 SharePoint Online Using Logic AppsPrashant G Bhoyar (Microsoft MVP)
 

Similar a SPSRED - BCS, REST ans Subscriptions (20)

#SPSOttawa introduction to the #microsoftGraph
#SPSOttawa introduction to the #microsoftGraph#SPSOttawa introduction to the #microsoftGraph
#SPSOttawa introduction to the #microsoftGraph
 
SharePoint Saturday Dayton 2012
SharePoint Saturday Dayton 2012SharePoint Saturday Dayton 2012
SharePoint Saturday Dayton 2012
 
SharePoint Custom Development
SharePoint Custom DevelopmentSharePoint Custom Development
SharePoint Custom Development
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
 
Oracle Application Express as add-on for Google Apps
Oracle Application Express as add-on for Google AppsOracle Application Express as add-on for Google Apps
Oracle Application Express as add-on for Google Apps
 
#SPFestSEA Introduction to #MicrosoftGraph
#SPFestSEA Introduction to #MicrosoftGraph#SPFestSEA Introduction to #MicrosoftGraph
#SPFestSEA Introduction to #MicrosoftGraph
 
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
 
Spring insight what just happened
Spring insight   what just happenedSpring insight   what just happened
Spring insight what just happened
 
SharePoint Saturday Louisville 2012
SharePoint Saturday Louisville 2012SharePoint Saturday Louisville 2012
SharePoint Saturday Louisville 2012
 
HTML5 features & JavaScript APIs
HTML5 features & JavaScript APIsHTML5 features & JavaScript APIs
HTML5 features & JavaScript APIs
 
Store, Extract, Transform, Load, Visualize. Untagged Conference
Store, Extract, Transform, Load, Visualize. Untagged ConferenceStore, Extract, Transform, Load, Visualize. Untagged Conference
Store, Extract, Transform, Load, Visualize. Untagged Conference
 
2 speed it powered by microsoft azure
2 speed it powered by microsoft azure2 speed it powered by microsoft azure
2 speed it powered by microsoft azure
 
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
OpenIDM - Flexible Provisioning Platform - April 28 WebinarOpenIDM - Flexible Provisioning Platform - April 28 Webinar
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
 
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
 
Importance of ‘Centralized Event collection’ and BigData platform for Analysis !
Importance of ‘Centralized Event collection’ and BigData platform for Analysis !Importance of ‘Centralized Event collection’ and BigData platform for Analysis !
Importance of ‘Centralized Event collection’ and BigData platform for Analysis !
 
Azure Application insights - An Introduction
Azure Application insights - An IntroductionAzure Application insights - An Introduction
Azure Application insights - An Introduction
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Himmelstein SP Connections HAD207 SharePoint Logging & Debugging
Himmelstein SP Connections HAD207 SharePoint Logging & DebuggingHimmelstein SP Connections HAD207 SharePoint Logging & Debugging
Himmelstein SP Connections HAD207 SharePoint Logging & Debugging
 
Data Privacy at Scale
Data Privacy at ScaleData Privacy at Scale
Data Privacy at Scale
 
Building Business Applications in Office 365 SharePoint Online Using Logic Apps
Building Business Applications in Office 365 SharePoint Online Using Logic AppsBuilding Business Applications in Office 365 SharePoint Online Using Logic Apps
Building Business Applications in Office 365 SharePoint Online Using Logic Apps
 

Último

4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...Nguyen Thanh Tu Collection
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
DBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfDBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfChristalin Nelson
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfChristalin Nelson
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
Shark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsShark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsArubSultan
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptxmary850239
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...Nguyen Thanh Tu Collection
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPCeline George
 

Último (20)

Spearman's correlation,Formula,Advantages,
Spearman's correlation,Formula,Advantages,Spearman's correlation,Formula,Advantages,
Spearman's correlation,Formula,Advantages,
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
DBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfDBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdf
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdf
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
Shark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsShark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristics
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
CARNAVAL COM MAGIA E EUFORIA _
CARNAVAL COM MAGIA E EUFORIA            _CARNAVAL COM MAGIA E EUFORIA            _
CARNAVAL COM MAGIA E EUFORIA _
 
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERP
 

SPSRED - BCS, REST ans Subscriptions

  • 1. BCS, REST and Subscriptions What is it and how to get it working!
  • 2. Chris Givens, CEO ACS San Diego SPUG - www.sanspug.org
  • 3. Background • BS Computer Science, Math, Business • 5 years at IBM in Sales and Distribution • 10 years in Seattle at various startups – Large volume transaction processing (Credit, Debit, Loyalty) • Microsoft Certified Trainer (MCT) since 2007 – CISSP, CCNP, JAVA, MCSD, SharePoint 4x • CEO ACS, leading SharePoint courseware provider to Microsoft Certified Training centers – Top selling titles in Development, BI and Search • SharePoint Sr. Architect – eBay – General Atomics
  • 4. What led to this session? • MOC Course 20489 – Advanced Development with SP2013 • Module 9 – “Working with Business Connectivity Services” – No documentation (“that works”) – No one has ever done this (outside PG) • Also led to posts on this subject on MSDNMSPress and my blog
  • 5. Business Connectivity Services • Service application that allows – External lists – BDC Columns – Indexing search content • Custom BCS Connectors allow SharePoint to index ANYTHING – Yes, anything!
  • 6. ODataREST • A simple approach at exposing APIs using common standard such as HTTP and REST – http://developer.cbssports.com/documentation • End points define the entities and methods you want to call – /stats – /add_drop • Parameters typically passed in the query string – POST data will be in body
  • 7. Subscriptions • Subscriptions allow SharePoint to be notified when external data changes – Adding – Modifying – Deleting • Event receivers have been around since 2003 – 2003 – only one - Recycle Bin – 2007 - Event Receivers – 2010 – More receivers added (no support for external lists)
  • 8. Subscription Methods • Two new BDC stereotyped methods – EventSubscriber – EventUnsubscriber • Methods can be implemented in various ways: – Database (Scot Hillier was 1st) – OData (CJG was 1st ) • These are in addition to the CRUD methods – CRUD methods easily created using SP Designer for database or Visual Studio with REST wizard
  • 9. BDC Model Method Properties • Subscription – IsDeliveryAddress – the delivery address to send to the external system – IsEventType – the type of event • Unsubscribe – SubscriptionIdName – The external systems subscription id
  • 10. BDC Model Method Attributes • ODataEntityUrl – Suffix of rest end point • ODataHttpMethod – GET, POST • ODataPayloadKind – http://msdn.microsoft.com/en- us/library/microsoft.data.odata.odatapayloadkind%28v=vs.113%29.aspx • ODataFormat – Content-type header (application/json;odata=verbose) – Based on the external system end point json support – OData Version 2 vs 3 (visual Studio wizard) • ODataServiceOperation – ??? • NotificationParserType – Defines the class that will handle the parsing of the external message
  • 11. Implementing External System Support • OData generated services will not have the methods necessary to support notifications – You must add them (Subscribe and Unsubscribe) • This is tricky – OData Service uses its own HTTP request handling mechanism – Request body is not available in your method – Expect to pass method parameters in the query string, not via the body
  • 12. The Subscription Process • Subscription list (External Subscription Store) must be created first – Created via External Events feature (BCSEvents, ExternalSubscription) – Hidden list in _private/ExtSubs • SharePoint calls subscribe method – Method returns SubscriptionId • Subscription list item is created with subscription information
  • 13. Creating Subscriptions • You can do this in three main ways – Explicitly call the Subscribe method (Server, Client, JSOM) – Create an alert • Very easy to do this for testing • Ensure you setup the outgoing email settings – Create an event receiver • Some things get cached in the event receiver registration • Requires you to remove and re-add
  • 14. Watch Out! • You web method code may execute successfully, but the http response may fail! – In this case, you have to handle the exception and remove the subscription in your code • OData DataService implemented as custom IRequestHandler – Override HandleException method • Also prevents getting the httprequest body
  • 15. Supported Event Receivers • Subscriptions can be one of three types – ItemAdded (1) – ItemUpdated (2) – ItemDeleted (3) • Cancel events are not supported – ItemAdding, ItemUpdating, ItemDeleting – No application domain that would wrap the two systems (EAI concepts)
  • 16. Message Formats • NotificationParserType – IdentityParser • /a:feed/a:entry/a:content/m:properties/b:BcsItemIdentity • Very simply event has occurred…no changed data – ODataEntryContentNotificationParser • /a:entry/a:link/m:inline/a:entry • Includes changed data – Custom • Inherit from abstract class NotificationParser • Implement the Initialize method • Why? Change the format to JSON rather than ATOM • Except for the XPath, everything is ignored!
  • 17. Getting the Message • Event receivers will expose the message sent from the external system – Allows for custom processing in your event receiver • Property called NotificationMessage • NOTE: Attempts to get item properties will fail if the message is improperly formatted – No parsing on message receive
  • 18. Demo • Create a subscription • Change data • Debug the event • Analyze the message
  • 19. Summary • It does work!  • External system must support sending notifications back to SharePoint • Message format is very specific • Ensure subscriptions get created in list • MSDN Blog • MSDN Code