190 likes | 457 Views
Secrets of the New Call HTTP Service Action for 2013 Workflows. Bill Wilson Senior Solution Architect. Agenda. Workflow 2010 vs 2013 Workflow Changes Workflow Extensions REST Call HTTP Service Action Demos. Workflow 2010 vs 2013. SP2010 workflow included in all SP2013 versions
E N D
Secrets of the New Call HTTP Service Action for 2013 Workflows Bill Wilson Senior Solution Architect
Agenda • Workflow 2010 vs 2013 • Workflow Changes • Workflow Extensions • REST • Call HTTP Service Action • Demos
Workflow 2010 vs 2013 • SP2010 workflow included in all SP2013 versions • No upgrade path/tool to 2013 workflows • Workflow 2013 • Separate install • Separate farm • Availability • SP2013 Standard • SP2013 Enterprise
Workflow 2013 Architecture Access Control SharePoint Designer Visual Studio SharePoint Events Content People Sharing 2010 WF OAuth _API (REST OM) Workflow Manager Workflow Services Manager Instances Interop Service Bus Workflow Client Deployment Messaging WF Service Application Proxy
Workflow Processing Workflow Backend Workflow Frontend SharePoint Assign Task Lookup User _API REST Reserve Task Id Site Users Tasks Create Task Events Persist Service Bus POST GET POST 2 1 3 GET /…/web/siteuserinfolist/items?$filter=id eq{0} Messages Instances POST /…/web/lists(guid'{0}')/reservelistitemid POST /…/web/lists(guid'{0}')/items
Workflow Installation • Separate installation • Free download • Can exist on the SharePoint server(s) • Can be a separate farm shared across multiple SharePoint farms • Configuration done using PowerShell • Must be connected to SharePoint • Supported configurations • 1 WF server instance • 3 or more WF server instances • Validation • Open SPD 2013
Workflow Changes • Types • List-based, site-based • Content-type no longer available • Declarative (based upon Workflow Foundation 4.5) • Actions • Over 40+ available • Task, item, document sets, general • Improvements • Steps, stages, loops • Copy & paste • Complex data types (dictionary)
Workflow Changes (continued) • Enhancements • New actions
Workflow Changes (continued) • SharePoint 2010 workflow authorization • Run as: initiator user • Run as: publisher user (Impersonation Step) • Specific for classic workflow • SharePoint 2013 workflow authorization • Workflows have identity (app principal) • Default access scope: read/write to site (Web.Write) • Run as: app & user • Run as: app only (App Step)
Workflow Extensions • Custom workflow actions • Absolutely! • Visual Studio 2012/2013 • But think before you do • Consider new option • REST • Call HTTP Service action
REST (Representational State Transfer) • What is REST? • Not a technology • Architectural abstraction • Allow systems to become open and accessible • Hides implementation details • Provides uniformity to wide set of tools • HTTP/HTTPS _api is new alias for _vti_bin/client.svc Server Client CSOM REST OData JSON JavaScript Library Silverlight Library .Net CLR Library Custom Client Code
SharePoint and REST • Added REST support to existing .svc service • Expanded REST API for SharePoint • http://<domain>/<site url>/_api/ • http://<domain>/<site url>/_api/web/lists • Tools • Chrome • Advanced REST Client • Postman • Fiddler Search Social Taxonomy Workflow Analytics Sharing Publishing eDiscovery IRM BCS Client object model method: List.GetByTitle(listname) REST endpoint: http://server/site/_api/lists/getbytitle('listname')
Call HTTP Service Actions • Accesses SharePoint 2013 via CSOM • Expects JSON format • HTTP Methods • GET (read) • POST (create) • PUT (update) • DELETE (delete)
Dictionary • New object variable • Complex data types • New action support types • Important to Call HTTP Service • Get an item • Used to retrieve data from within dictionary • Build dictionary • Used to create and enter data into dictionary • Count items • Used for looping thru the entire dictionary collection
When to use Call HTTP Service • Many useful SP2010 actions are now removed • Tasks for using REST • Querying lists • Creating document sets • Copying documents/files to new locations • Breaking/setting permissions • Creating new sites • Call custom services • Others
Summary • Reviewed workflow changes from SP2010 to SP2013 • Architecture • Available workflow actions • REST • Brief introduction • Call HTTP Service Action
Questions? Bill Wilson Senior Solution Architect