SlideShare a Scribd company logo
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

More Related Content

What's hot (20)

PPTX
SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...
Chirag Patel
 
PPTX
SPS Reston SharePoint Alwyays On
Mike Maadarani
 
PPTX
SharePoint 2013 i SharePoint Online
Dragan Panjkov
 
PPTX
SharePoint 2013 Admin in the Hybrid World
Jason Himmelstein
 
PDF
SharePoint 2016 Upgrade Planning
Chandima Kulathilake
 
PPTX
How to execute SharePoint 2016 upgrade strategy and ensure business continuity
SUGES (SharePoint Users Group España)
 
PPTX
Prepare for SharePoint 2016 - IT Pro best practices for managing your SharePo...
Toni Frankola
 
PPTX
Securing SharePoint Environment and its Content - SharePoint User Group UK Ca...
Chirag Patel
 
PDF
ECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenarios
European Collaboration Summit
 
PDF
Made for Mobile - Let Office 365 Power Your Mobile Apps
SPC Adriatics
 
PPTX
ECS19 - Robi Voncina - Upgrade to SharePoint 2019
European Collaboration Summit
 
PPTX
WISPUG - Fun with SharePoint Migrations
Brian Caauwe
 
PDF
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Rencore
 
PPTX
Product Catalog and IT Service Management
Drew Madelung
 
PPTX
Building dashboards with Visio Services
Alan Richards
 
PDF
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
NCCOMMS
 
PPTX
SPSLondon 2015 Evolving with Office 365 and SharePoint Online Collaboration T...
Chirag Patel
 
PDF
What's New in SharePoint 2016 for End Users Webinar with Intlock
Vlad Catrinescu
 
PPTX
What's new in SharePoint 2016
Giuseppe Marchi
 
PPTX
ECS19 - Matthew McDermott - How to Run a Search Project in SharePoint
European Collaboration Summit
 
SharePoint Saturday Madrid 2016 - SharePoint Upgrade or Migration, or is it b...
Chirag Patel
 
SPS Reston SharePoint Alwyays On
Mike Maadarani
 
SharePoint 2013 i SharePoint Online
Dragan Panjkov
 
SharePoint 2013 Admin in the Hybrid World
Jason Himmelstein
 
SharePoint 2016 Upgrade Planning
Chandima Kulathilake
 
How to execute SharePoint 2016 upgrade strategy and ensure business continuity
SUGES (SharePoint Users Group España)
 
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...
Chirag Patel
 
ECS19 - Rodrigo Pinto - Migrating to Teams, real cases and scenarios
European Collaboration Summit
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
SPC Adriatics
 
ECS19 - Robi Voncina - Upgrade to SharePoint 2019
European Collaboration Summit
 
WISPUG - Fun with SharePoint Migrations
Brian Caauwe
 
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Rencore
 
Product Catalog and IT Service Management
Drew Madelung
 
Building dashboards with Visio Services
Alan Richards
 
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...
Chirag Patel
 
What's New in SharePoint 2016 for End Users Webinar with Intlock
Vlad Catrinescu
 
What's new in SharePoint 2016
Giuseppe Marchi
 
ECS19 - Matthew McDermott - How to Run a Search Project in SharePoint
European Collaboration Summit
 

Viewers also liked (6)

PPTX
5 Steps to Better SharePoint Adoption
C5 Insight
 
PPTX
SPS Nashville - Build It and They Will Come SharePoint 2013 User Adoption
Stacy Deere
 
PPTX
Failure to Connect: Why You're Not Getting More From SharePoint
C5 Insight
 
PDF
SharePoint User Group Meeting- SharePoint 2013 Search
C/D/H Technology Consultants
 
PPTX
SharePoint Saturday Cuba
Chris Givens
 
PPTX
Shop talk - Project Server 2013
Chris Givens
 
5 Steps to Better SharePoint Adoption
C5 Insight
 
SPS Nashville - Build It and They Will Come SharePoint 2013 User Adoption
Stacy Deere
 
Failure to Connect: Why You're Not Getting More From SharePoint
C5 Insight
 
SharePoint User Group Meeting- SharePoint 2013 Search
C/D/H Technology Consultants
 
SharePoint Saturday Cuba
Chris Givens
 
Shop talk - Project Server 2013
Chris Givens
 
Ad

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

PPTX
Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365
Shahzad S
 
PPTX
Building Custom BCS .NET Connectors
Chakkaradeep Chandran
 
PPTX
Is BCS Dead?
Jeff Fried
 
PDF
Make SharePoint your Information Hub with Business Connectivity Services
brettlonsdale
 
PPTX
Business Connectivity Services With Share Point 2010
Alexander Meijers
 
PDF
COM Events for Late-bound Delivery of Information
Arun Seetharaman
 
PPTX
Sql Saturday 228 Rapid Data Integration Using SharePoint BCS
Obilogic
 
KEY
SharePoint 2010 Client Object Model
G. Scott Singleton
 
PPSX
SharePoint 2010 Integration and Interoperability: What you need to know
Richard Harbridge
 
PDF
Event Driven-Architecture from a Scalability perspective
Jonas Bonér
 
PPT
8 Tips & Tricks for Better BizTalk Programming
Daniel Toomey
 
PPTX
SharePoint Fest Chicago - SharePoint 2010 Integration and Interoperability: W...
Richard Harbridge
 
KEY
Event Driven Architecture
andreaskallberg
 
PPTX
Best Practices Integration And Interoperability
AllinConsulting
 
PPTX
Best Practices - SharePoint 2010: Integration and Interoperability
Richard Harbridge
 
PPTX
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SPTechCon
 
PPTX
Connecting to LOB Systems Using BCS, Ayman El-Hattab, MVP
Ayman El-Hattab
 
PPTX
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
Richard Harbridge
 
PPTX
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
Richard Harbridge
 
PPTX
SharePoint Saturday Louisville 2012
Scott_Brickey
 
Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365
Shahzad S
 
Building Custom BCS .NET Connectors
Chakkaradeep Chandran
 
Is BCS Dead?
Jeff Fried
 
Make SharePoint your Information Hub with Business Connectivity Services
brettlonsdale
 
Business Connectivity Services With Share Point 2010
Alexander Meijers
 
COM Events for Late-bound Delivery of Information
Arun Seetharaman
 
Sql Saturday 228 Rapid Data Integration Using SharePoint BCS
Obilogic
 
SharePoint 2010 Client Object Model
G. Scott Singleton
 
SharePoint 2010 Integration and Interoperability: What you need to know
Richard Harbridge
 
Event Driven-Architecture from a Scalability perspective
Jonas Bonér
 
8 Tips & Tricks for Better BizTalk Programming
Daniel Toomey
 
SharePoint Fest Chicago - SharePoint 2010 Integration and Interoperability: W...
Richard Harbridge
 
Event Driven Architecture
andreaskallberg
 
Best Practices Integration And Interoperability
AllinConsulting
 
Best Practices - SharePoint 2010: Integration and Interoperability
Richard Harbridge
 
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SPTechCon
 
Connecting to LOB Systems Using BCS, Ayman El-Hattab, MVP
Ayman El-Hattab
 
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
Richard Harbridge
 
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
Richard Harbridge
 
SharePoint Saturday Louisville 2012
Scott_Brickey
 
Ad

Recently uploaded (20)

PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
PPTX
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
PPTX
How to Configure Lost Reasons in Odoo 18 CRM
Celine George
 
PPTX
ROLE OF ANTIOXIDANT IN EYE HEALTH MANAGEMENT.pptx
Subham Panja
 
PPTX
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
PPTX
HEAD INJURY IN CHILDREN: NURSING MANAGEMENGT.pptx
PRADEEP ABOTHU
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
PPTX
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
PPTX
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PPTX
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
How to Configure Lost Reasons in Odoo 18 CRM
Celine George
 
ROLE OF ANTIOXIDANT IN EYE HEALTH MANAGEMENT.pptx
Subham Panja
 
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
HEAD INJURY IN CHILDREN: NURSING MANAGEMENGT.pptx
PRADEEP ABOTHU
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 

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