32

Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Embed Size (px)

Citation preview

Page 1: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203
Page 2: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Using SharePoint to Bring All Together, from Legacy Applications to the Cloud

Larry MeadMicrosoft Corp.

Jon FlandersSession Code: INT203

Page 3: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Session objectives

Have an understanding of how SharePoint can be used for application compositionOverview of SharePoint 2010 workflow featuresOverview of building workflows in SharePoint 2010

Page 4: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

AgendaThe problem with legacy migrated systemsUsing SharePoint for end to end integrationWorkflow and application compositionWhat’s new with Workflows in SharePoint Server 2010?

Support for .NET 3.5SPD -> Export -> Visual Studio -> ImportSite WorkflowsCustom Local ServicesWorkflow Event Receivers

Page 5: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Migration Without IntegrationDEMO

Page 6: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

SharePoint Integration Points

Why use SharePoint for Integration?Already commonly used by Microsoft enterprise customers

What types of applications can be brought together with SharePoint?

Just about anything from legacy applications and applicatins to the cloud

What’s Missing?Workflow capabilities of WF!

Page 7: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

SharePoint Workflow Composition

SharePointWorkflow Services

SharePoint Portal

WCF Services

LegacyPrograms

Cloud Applicatoins

.NET Services

Windows Azure

BizTalk Server

OtherEnterprise

Applications

Page 8: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Mainframe integration Approach Presentation layer

BATCH

DWH

CICS

TSOHIS

MigatedCICS Communiti

es

Search

Sites

Composites

ContentInsights

WPF

Page 9: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

.NET framework version

SharePoint 2010 has a dependency on .NET 3.5Workflows in SharePoint Server 2010 are *not* WF 4.0 Workflows.NET Framework release schedule doesn’t align with SharePoint Server 2010

Would have delayed SharePoint Server 2010 significantly to take a dependency on WF 4.0

Page 10: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

File system

SPD Workflow Import

SPD has a new reusable declarative Workflow templateOnce deployed it can be saved to a template (.wsp)Template can be imported into Visual Studio 2010 and modified

WSP

Deploy Package

Save to File System Create New ProjectImport WSP

NEW!

Page 11: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

SPD Export – Visual Studio 2010 ImportDEMO

Page 12: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Site Workflows

In SP 2010, Workflows don’t have to be associated with a List instance

No need to create a “dummy” list just to get a workflow to run

Potential usesAccessing External Data - BCSGeneral Business LogicManaging Site permissionsManaging Site or Item (across Lists) creation

NEW!

Page 13: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Creating a Site Workflow

Pick “Site” when creating Workflow in Visual Studio 2010Manage via “Site Workflows” under “Site Actions”Workflow must be started manually

Requires instantiation form

Page 14: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Workflow Forms

Visual Studio 2010 SharePoint tools have templates for

Workflow Initiation FormWorkflow Association Form

Add them at Workflow node level in Solution Explorer and the Elements.xml is automatically modified

Page 15: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Building and Deploying a Site WorkflowDEMO

Page 16: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

SPS/Workflow communication

Workflow communication in SharePoint is done via ExternalDataExchange (EDS)

Built on top of Workflow Queue InfrastructureEDS uses an interface definition for workflow/host communication“Local Service” implements interface

HandleExternalEvent triggered by firing interface eventCallExternalMethod calls interface method

SPS communication Activities are strongly-typed versions of HEE, CEM

Page 17: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

WF Communication

Host

WF Runtime

LocalServic

e

Workflow RestoredFrom Storage

Workflow

Activity

Activity

MSG

Queue

Workflow PersistedTo Storage

Some Time May Elapse

MSG

Page 18: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Local Service extensibility

Before SP 2010, only the SP-defined Local Service could be usedSPS 2010 enables adding custom Local Services

Can use CEM/HEE orwca.exe tool to create strongly-typed Activities (e.g. OnWorkflowActivated/CreateTask)

NEW!

Page 19: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Building a custom Local Service

Define an EDS interfaceCreate a class that derives from the SPWorkflowExternalDataExchangeService base classImplement the EDS interfaceNeed to add an entry to the web.config

WorkflowServices configuration section

Page 20: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Using Local Services

Configure Activities that use Local ServiceHandleExternalEvent/CallExternalMethodOr use WCA.exe to generate strongly-typed versions

Page 21: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Building and Deploying a Custom Local Service for Legacy & External Integration

DEMO

Page 22: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Workflow Event Receivers

SharePoint’s WorkflowRuntime is “closed”No way to hook into WorkflowRuntime events

Workflow Event Receives in SharePoint Server 2010 are code-based Event Receivers

Similar to List Event ReceiversSupport built into Visual Studio 2010 SharePoint tools

EventReceiver Project or Item template

NEW!

Page 23: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

SPWorkflowEventReceiver

New SPEventReceiverBase-derived class for 2010Derived and override methods for needed functionality

StartingStartedPostponedCompleted

Register as EventReceiver for a listAssociates with list workflows automatically

Page 24: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Workflow Event Receiver

public class MyWorkflowEventReceiver : SPWorkflowEventReceiver{ public override void WorkflowStarting(SPWorkflowEventProperties p) { base.WorkflowStarting(properties); } public override void WorkflowStarted(SPWorkflowEventProperties p) { base.WorkflowStarted(properties); } public override void WorkflowPostponed(SPWorkflowEventProperties p) { base.WorkflowPostponed(properties); } public override void WorkflowCompleted(SPWorkflowEventProperties p) { base.WorkflowCompleted(properties); }}

Page 25: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Building and Deploying a Workflow Event Receiver

DEMO

Page 26: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Summary

Workflows are (have been) a powerful way to model functionality in SharePointImprovements to the engine and tools in SharePoint Server 2010/Visual Studio 2010 make Workflow an even more attractive way to develop in SharePoint

SPD ExportEventReceiversLocal ServicesVisual Studio

Page 27: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Related Content

Workflow in SharePoint 2010: OverviewOverview: Creating Workflows With SharePoint Designer 2010, InfoPath, And VisioIntroduction To SharePoint Designer 2010: Top 10 great things to know

Page 28: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

© 2009 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.

Page 29: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

question & answer

Page 30: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

www.microsoft.com/teched

Sessions On-Demand & Community

http://microsoft.com/technet

Resources for IT Professionals

http://microsoft.com/msdn

Resources for Developers

www.microsoft.com/learning

Microsoft Certification & Training Resources

Resources

Page 31: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

Complete an evaluation on CommNet and enter to win an Xbox 360 Elite!

Page 32: Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203

© 2009 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.