280 likes | 746 Views
BB47. Asynchronous Messaging With SharePoint Workflows. Alexander Malek Lead Program Manager SharePoint Microsoft Corporation. Agenda. SharePoint in the Microsoft Workflow Ecosystem Async Messaging in SharePoint Overview Using WCF and Azure Services Platform Scenario Overview
E N D
BB47 Asynchronous Messaging With SharePoint Workflows Alexander Malek Lead Program Manager SharePoint Microsoft Corporation
Agenda • SharePoint in the Microsoft Workflow Ecosystem • Async Messaging in SharePoint Overview • Using WCF and Azure Services Platform • Scenario Overview • Demo!
SharePoint Workflow • Part of Microsoft Workflow Ecosystem • Office SharePoint Server for IW document- process applications • Windows Server (Dublin) for custom business applications • BizTalk Server for data orchestration applications • SharePoint Scenarios: • Document Approval, Content Publishing, Document Assembly, Change Tracking
UnifiedCommunicationsAnd Collaboration BusinessIntelligence Enterprise ContentManagement WebsiteAndSecurityFramework BusinessDataCatalog OpenXML FileFormats ExtensibleUI Search Workflow Secured, Well-Managed Infrastructure Overall SharePoint Platform
Asynchronous Human WF Scenarios • Tasks are the core building block of human workflow • Tasks in SharePoint • Item in a SharePoint tasks list • Acts as a proxy for the actual work • Change events to the item are correlated back into the correct workflow instance for evaluation
Asynchronous Messaging With External Systems • Characteristics of the SharePoint 2007 workflow host • .net 3.0-based – no support for .net 3.5 Send/Receive activities • EDES-based messaging not extensible • Recommendation: Use “Business Task” pattern • Create an item in “business tasks” list • Pass ID of item to external system as callback function • Wait on changes to item • Build a WCF service to receive the callback
Using WCF In SharePoint • Possible to host a WCF service in the SharePoint application • Requires asp.net compatibility mode • Good post on the topic by Michael Washam • Recommendation: Create a separate asp.net application for the service • Cleaner separation for your custom code • Downside… no context web
Creating B2B Applications using Azure Services Platform • As part of .net Services, there is a new Service Bus offering • Makes it easy to connect applications together over the Internet • Services register on the “bus”, and can then be easily discovered and accessed, across any network topology
demo Employee Onboarding Alexander Malek Lead Program Manager SharePoint Designer
Scenario Walkthrough • Contoso Consulting – Remote Employee Onboarding • Onboarding workflow: • Assign a task • Once approved • Submit to external business system • Wait for completion message before completing workflow
Employee Onboarding – Process Diagram Update BizTask
Dev Machine • Single machine • Three web applications • SharePoint for approval workflow • Windows App Server for back-end process • Windows App Server for SharePoint proxy service
Development Overview • Build SharePoint approval workflow • Create and bind InfoPath forms • Build WCF Service for Remote System • Connect workflow to service • Build WCF Service for SharePoint, published to Azure-based Service Bus • Connect remote system service to SharePoint service via cloud
Part 1: Assign a Human Task • Add set of activities to represent approval Update BizTask
Part 1 Summary • Use CreateTask, OnTaskChanged, and CompleteTask Activities to define a human task • Hints: • Correlation is defined by Correlation Token and TaskIDGuid • CompleteTask Activity required to update task list status
Part 2: Create Remote WCF Endpoint • Show using workflow to represent a service Update BizTask
Part 2 Summary • Demonstrated using a workflow to model a web service • Hints: • Update getters/setters to match service contract
Part 3: Assign a Business Task • Add business task and code call-out to web service Update BizTask
Part 3 Summary • Demonstrated calling a WCF service from a SharePoint workflow, and using a business task to coordinate the work • Hints: • Make sure to add end-point reference in web.config
Part 4: Create Local WCF Endpoint • Create a local service, accessible via the Internet Update BizTask
Part 4 Summary • Demonstrated creating a WCF service published to the Azure-based Service Bus • Hints: • Make sure to add end-point reference in web.config
Summary • Use Tasks for Human and System messaging • Host WCF services as a separate app from SharePoint • Azure Service Bus for cross-enterprise communication • Reference: Building Workflow Forms
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
Q&A Please use the microphones provided
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.