Automating Business Processes
with APIs
Saul	Caganoff
CTO,	Sixtree
@scaganoff @APIdaysAU
The Web is Now Programmable
• We	need	to	talk	about	consuming	APIs
• Each	API	will	have	thousands	or	millions	of	consumers...
SaaS - Different Levels of Specialization
• Infrastructure	– storage,	compute,	management,	integration
• Commodity – peopl...
iPaaS & Cloud BPM
Consumer
Enterprise
Cloud	BPM
Data	Sync
This is what you want…
• The	business	process	ensemble
• Coordination	between	process	and	API?
• API	is	constrained	by	its...
This is what you get…
• Each	SaaS	is	built	as	an	island
…or	with	point	integrations
• Not	designed	for	integration
• An	aw...
E.g. Bookstore
Finance
Sales
Fulfilment
Product
Customer
End-to-end Process
?
State: the “S” in REST
• Created
• Composed
• Addressed
• Quoted
• Paid
• Confirmed
• Declined
• Cancelled
Created Populated Addressed Quoted
PaidDeclined ConfirmedCancelled
Add
Item
Add
Item
Remove
Item
Accepted
Add
Credit	Card
...
HATEOAS
• State	Model
• Business	Process	=	a	path	through	the	state	model
• API	Affordances
– Expose	hyperlinks	that	repre...
HATEOAS
Empty
Cart
Full
Cart
Quoted
Paid
POST	/cart
PUT	/cart/:id
{	book:	…	}
PUT	/cart/:id
{	book:	…	}
DELETE	/cart/:id/b...
HATEOAS and Events
• State	Model
• Business	Process	=	a	path	through	the	state	model
• Duality	between	state	transitions	a...
Event Transports: Syndication
• API	exposes	list	of	events	– e.g.	an	RSS/atom	feed
• Consumers	do	all	the	hard	work:
– Sub...
Event Transports: WebHooks
• Service	POSTs	events	to	subscribers
• Publishers	do	all	the	hard	work:
– Subscriber	managemen...
Check out RESTHooks
• Sponsored	by	Zapier
• WebHooks with
• RESTful Subscription	Management
resthooks.org
Notification Services
End-to-end Process
Update
Inventory
Process
Payment
Initiate
Fulfilment
Update
Financials
Complete
Order
Affordances for Business Automation
• Have	an	explicit	State	Model
– With	published	hypermedia	controls
• Track	changes
– ...
Automating Business Processes with APIs
Prochain SlideShare
Chargement dans…5
×

Automating Business Processes with APIs

2 318 vues

Publié le

How can we orchestrate and integrate different SaaS products to support end-to-end business processes? What affordances do SaaS providers need to design into their APIs to help deliver the Composable Enterprise.

Publié dans : Technologie

Automating Business Processes with APIs

  1. 1. Automating Business Processes with APIs Saul Caganoff CTO, Sixtree @scaganoff @APIdaysAU
  2. 2. The Web is Now Programmable • We need to talk about consuming APIs • Each API will have thousands or millions of consumers • Enterprise digital initiatives – lean, SaaS, PaaS, IaaS • How to enable the Composable Enterprise?
  3. 3. SaaS - Different Levels of Specialization • Infrastructure – storage, compute, management, integration • Commodity – people, places, things, payment, security… • Functional – sales, marketing, service management, financial, human resources… • Industry – healthcare, education, supply-chain… • Your unique business value depends on how you integrate and operate all these services – The end-to-end business process
  4. 4. iPaaS & Cloud BPM Consumer Enterprise Cloud BPM Data Sync
  5. 5. This is what you want… • The business process ensemble • Coordination between process and API? • API is constrained by its underlying state model • Business Process has its own goal to achieve
  6. 6. This is what you get… • Each SaaS is built as an island …or with point integrations • Not designed for integration • An awful lot of polling going on “We’ve got a long way to go” - @njyx
  7. 7. E.g. Bookstore Finance Sales Fulfilment Product Customer
  8. 8. End-to-end Process ?
  9. 9. State: the “S” in REST • Created • Composed • Addressed • Quoted • Paid • Confirmed • Declined • Cancelled
  10. 10. Created Populated Addressed Quoted PaidDeclined ConfirmedCancelled Add Item Add Item Remove Item Accepted Add Credit Card Details Add Address Calculate Cost Declined Add Credit Card Details Cancel Cancel Cancel Cancel Cancel
  11. 11. HATEOAS • State Model • Business Process = a path through the state model • API Affordances – Expose hyperlinks that represent available state transitions
  12. 12. HATEOAS Empty Cart Full Cart Quoted Paid POST /cart PUT /cart/:id { book: … } PUT /cart/:id { book: … } DELETE /cart/:id/books/:id PUT /cart/:id { address: … } POST /payments { cart: …, card: {…}} Commands {create: { cart: … } … } {add: { cart: …, book: {…}} ..} {add: { cart: …, book: {…}} ..} {del: { cart: …, book: {…}} ..} {quoted: { cart: … } … } {paid: { cart: … } … } Events (EATNOAS)
  13. 13. HATEOAS and Events • State Model • Business Process = a path through the state model • Duality between state transitions and events • An external observer can infer the state of a resource from its event-stream – This is the essence of event-sourcing & CQRS • Affordances – Expose hyperlinks that represent available state transitions – Publish events that notify actual state transitions
  14. 14. Event Transports: Syndication • API exposes list of events – e.g. an RSS/atom feed • Consumers do all the hard work: – Subscription – State Management (where am I up to?) – Retries • Positives – Very easy…well-known pattern • Negatives – Polling – High latency
  15. 15. Event Transports: WebHooks • Service POSTs events to subscribers • Publishers do all the hard work: – Subscriber management – Consumers must provide an endpoint • Positives – Not polling, relatively lower latency • Negatives – Subscription management & guaranteed delivery must be done yourself – Reliability requires coordination between publisher & subscriber
  16. 16. Check out RESTHooks • Sponsored by Zapier • WebHooks with • RESTful Subscription Management resthooks.org
  17. 17. Notification Services
  18. 18. End-to-end Process Update Inventory Process Payment Initiate Fulfilment Update Financials Complete Order
  19. 19. Affordances for Business Automation • Have an explicit State Model – With published hypermedia controls • Track changes – Allow query of changes since last “poll” • Even better - notify changes – Event streams – WebHooks or REST Hooks – Notification Services • Consider the importance of event reliability

×