Automating Business Processes with APIs
-
Upload
saul-caganoff -
Category
Technology
-
view
2.115 -
download
2
Transcript of Automating Business Processes with APIs
![Page 1: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/1.jpg)
Automating Business Processes with APIs
SaulCaganoffCTO,Sixtree
@scaganoff @APIdaysAU
![Page 2: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/2.jpg)
The Web is Now Programmable
• WeneedtotalkaboutconsumingAPIs• EachAPIwillhavethousandsormillionsofconsumers• Enterprisedigitalinitiatives– lean,SaaS,PaaS,IaaS• HowtoenabletheComposableEnterprise?
![Page 3: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/3.jpg)
![Page 4: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/4.jpg)
SaaS - Different Levels of Specialization
• Infrastructure– storage,compute,management,integration• Commodity – people,places,things,payment,security…• Functional – sales,marketing,servicemanagement,financial,humanresources…
• Industry – healthcare,education,supply-chain…• Youruniquebusinessvaluedependsonhowyouintegrateandoperatealltheseservices– Theend-to-endbusinessprocess
![Page 5: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/5.jpg)
iPaaS & Cloud BPM
Consumer
Enterprise CloudBPM
DataSync
![Page 6: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/6.jpg)
This is what you want…• Thebusinessprocessensemble• CoordinationbetweenprocessandAPI?• APIisconstrainedbyitsunderlyingstatemodel• BusinessProcesshasitsowngoaltoachieve
![Page 7: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/7.jpg)
This is what you get…
• EachSaaSisbuiltasanisland…orwithpointintegrations
• Notdesignedforintegration• Anawfullotofpollinggoingon
“We’vegotalongwaytogo”- @njyx
![Page 8: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/8.jpg)
E.g. Bookstore
Finance
Sales
Fulfilment
Product
Customer
![Page 9: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/9.jpg)
End-to-end Process
?
![Page 10: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/10.jpg)
State: the “S” in REST
• Created• Composed• Addressed• Quoted• Paid• Confirmed• Declined• Cancelled
![Page 11: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/11.jpg)
Created Populated Addressed Quoted
PaidDeclined ConfirmedCancelled
AddItem
AddItem
RemoveItem
Accepted
AddCreditCardDetails
AddAddress
CalculateCost
Declined
AddCreditCardDetails
Cancel Cancel Cancel Cancel
Cancel
![Page 12: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/12.jpg)
HATEOAS
• StateModel• BusinessProcess=apaththroughthestatemodel• APIAffordances– Exposehyperlinksthatrepresentavailablestatetransitions
![Page 13: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/13.jpg)
HATEOAS
EmptyCart
FullCart
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)
![Page 14: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/14.jpg)
HATEOAS and Events• StateModel• BusinessProcess=apaththroughthestatemodel• Dualitybetweenstatetransitionsandevents• Anexternalobservercaninferthestateofaresourcefromitsevent-stream– Thisistheessenceofevent-sourcing&CQRS
• Affordances– Exposehyperlinksthatrepresentavailablestatetransitions– Publisheventsthatnotifyactualstatetransitions
![Page 15: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/15.jpg)
Event Transports: Syndication• APIexposeslistofevents– e.g.anRSS/atomfeed• Consumersdoallthehardwork:– Subscription– StateManagement(whereamIupto?)– Retries
• Positives– Veryeasy…well-knownpattern
• Negatives– Polling– Highlatency
![Page 16: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/16.jpg)
Event Transports: WebHooks• ServicePOSTseventstosubscribers• Publishersdoallthehardwork:– Subscribermanagement– Consumersmustprovideanendpoint
• Positives– Notpolling,relativelylowerlatency
• Negatives– Subscriptionmanagement&guaranteeddeliverymustbedoneyourself– Reliability requirescoordinationbetweenpublisher&subscriber
![Page 17: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/17.jpg)
Check out RESTHooks
• SponsoredbyZapier• WebHooks with• RESTful SubscriptionManagement
resthooks.org
![Page 18: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/18.jpg)
Notification Services
![Page 19: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/19.jpg)
End-to-end Process
UpdateInventory
ProcessPayment
InitiateFulfilment
UpdateFinancials
CompleteOrder
![Page 20: Automating Business Processes with APIs](https://reader033.fdocuments.us/reader033/viewer/2022042908/58f29b081a28ab80178b45b3/html5/thumbnails/20.jpg)
Affordances for Business Automation
• HaveanexplicitStateModel–Withpublishedhypermediacontrols
• Trackchanges– Allowqueryofchangessincelast“poll”
• Evenbetter- notifychanges– Eventstreams–WebHooks orRESTHooks– NotificationServices
• Considertheimportanceofeventreliability