Documente Academic
Documente Profesional
Documente Cultură
WORKFLOW ACTIVITY
Derek Nishino
Nishino Consulting
derek@nishinoconsulting.com
Agenda
What is the Call HTTP Web Service Workflow Activity?
What Can It Do?
SharePoint REST Web Services
SharePoint Designer Workflow Dictionary Variables
Retrieving Items from a SharePoint List
Writing to a SharePoint List
Gotchas
What Is It?
SharePoint Designer workflow activity for 2013-style workflows
Makes calls to REST web services, including the SharePoint web services
Allows looping through data such as items from a SharePoint list in a targeted way
NOT LIMITED TO CALLING SHAREPOINTS REST WEB SERVICES
HTTP GET, PUT, POST, DELETE
Must support OData and JSON
Dictionaries
A new type of workflow variable
Used to hold data structures for calling REST web services
Similar to concept of arrays in software development
Can also think of them as lists of data within your workflow
Can have Dictionaries nested in Dictionaries
Dictionary Actions
Build Dictionary
Get an Item from a Dictionary
Count Items in Dictionary
requestHeaders (Dictionary) contains two headers that you add using the
Set Call HTTP Web Service action properties as follows (easiest to set from
properties window)
Address = restURL variable
RequestType = HTTP GET
RequestHeaders = requestHeaders variable
ResponseContent = responseContent variable
ReponseHeaders = responseHeaders variable
ResponseStatuesCode = responseCode variable
DEMO
Actually much easier than that if youre just reading a list, just need
in Dictionary action
Index keeps track of which item were currently working with in
operation)
with
Use Get an Item from a Dictionary to pull the column values from each row of
Filtering Results
Dont always want all items in a list
REST supports use of logical operators in the URL to filter results
Less Than, Equal To, Greater Than or Equal To, etc.
REST has operations for numbers, strings, and dates not all are supported by
SharePoint
Can specify columns, sort order, and more
Add ?$filter= without quotes to the end of your REST URL with the logical
than 50
Gotchas
Can be difficult to troubleshoot
Authentication requirements in SharePoint Online make it
Resources
Step-by-Step Guide for Reading List Items
http://
weblogs.asp.net/ricardoperes/looping-through-list-items-in-sharepoint-2013
OData Query Operations
https://msdn.microsoft.com/en-us/library/office/fp142385.aspx
MSDN Intro to SharePoint 2013 REST
https://msdn.microsoft.com/en-us/library/office/fp142380.aspx
Step-by-Step Guide for Updating List Items
http://blog.ctp.com/2014/03/12/updating-list-items-using-sharepoint-2013-work
flow-engine
/
THANK YOU!!!