Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd...

33
Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd [email protected] http://blogs.msdn.com/mikeormond
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd...

Page 1: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Windows Vista for Syndication and Workflow

Mike OrmondDeveloper & Platform Group, Microsoft [email protected]://blogs.msdn.com/mikeormond

Page 2: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

AgendaAgenda

• Introduction to WF• Workflow Basics• Activities• Sequential Workflow• State Machine Workflow• Runtime Services

Page 3: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Windows Workflow Windows Workflow FoundationFoundation• .NET Fx V3.0

– V2.0 Compilers– V2.0 CLR

– VS 2005• Operating Systems

– Vista– XP Sp2– Server 2003 Sp1

Page 4: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

…organized into a workflow

A set of activities that coordinate peopleand / or software...

What is a Workflow?What is a Workflow?

EscalateToManagerExample activities…. CheckInventory

Like a flowchart Or state diagram

Page 5: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Windows Workflow Foundation

Page 6: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Host Process

They run in any managed host process

6

Base Activity Library Supplied activities, base for custom activities

WindowsWorkflow Foundation

The Big PictureThe Big Picture

Workflow

Activity Workflows are a set of activities

Custom Activity Library You can build custom activities

Visual Designer Graphical and code-based construction

Runtime Engine Workflow execution and state management

Runtime Services Hosting flexibility, communication,

passivation, and tracking

Rules Engine Declarative modeling of units of app logic

Page 7: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Windows Workflow Windows Workflow FoundationFoundation

• For human and system workflow scenarios

• Framework for building workflow into .NET applications– Not an application or server– Exposed to developers by .NET 3.0

Single workflow technology for Microsoft products and partner / customer ecosystem

Page 8: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

AgendaAgenda

• Introduction to WF• Workflow Basics• Activities• Sequential Workflow• State Machine Workflow• Runtime Services

Page 9: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

9

Workflow BasicsWorkflow Basics

• A workflow is a class

• A workflow class can also be defined using markup

Page 10: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Creating a Workflow Instance

Page 11: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

The DesignerThe Designer

• Graphical designer for workflow

• Drag and drop of activities• Support for sequential & state

machine workflows• Full debugging support• Hosted in Visual Studio

– Rehost in your application

Page 12: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

AgendaAgenda

• Introduction to WF• Workflow Basics• Activities• Sequential Workflow• State Machine Workflow• Runtime Services

Page 13: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Activity BasicsActivity Basics

• Two types of activity– Activity: Does “work”– CompositeActivity: Manages child

activities

• Base Activity Library• Custom Acitivities

– Eg a library of RSS Activities

Page 14: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Feeds PlatformFeeds Platform

DownloadEngine

RSS 0.9xRSS 1.0RSS 2.0Atom

Browsers Photos Contacts …

News Blogs Photos Audio Calendars Lists More

MergeProcessor

CommonFeedlist

Items Enclosures

RSS Object Model

Store

Service

API

Page 15: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Feeds APIFeeds API

• COM API– Two flavors:

• Automation-friendly (IFeed…)

• Early-bound (IXFeed…)

• Use interop from .NET framework– Type library available– Work with IFeed...

classes

FeedsManager

Feed

FeedFolder

FeedItem

FeedEnclosure

Page 16: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

NotificationsNotificationsFe

ed E

vents

Feed E

vents

Fold

er

Events

Fold

er

Events

Page 17: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Subscribing to Blogs, News, and Other Web Sites

Page 18: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Initialized

Executing

Closed

Compensating

Canceling

Faulting

Activity State MachineActivity State Machine

Page 19: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

An RSS Activity

Page 20: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Agenda

• Introduction to WF• Workflow Basics• Activities• Sequential Workflow• State Machine Workflow• Runtime Services

Page 21: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Sequential WorkflowSequential Workflow

Step1

Step2

Sequentialstructure describesprocessing order•Prescriptive, formal

•Automation scenarios•Flowchart metaphor

Page 22: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

RSS Sequential Workflow

Page 23: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

AgendaAgenda

• Introduction to WF• Workflow Basics• Activities• Sequential Workflow• State Machine Workflow• Runtime Services

Page 24: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

State Machine WorkflowState Machine Workflow

DVD Player Example

Page 25: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

A state machine workflow

Page 26: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

AgendaAgenda

• Introduction to WF• Workflow Basics• Activities• Sequential Workflow• State Machine Workflow• Runtime Services

Page 27: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Runtime ServicesRuntime Services

• Rich set of runtime services, all pluggable– Persistence – Error handling– Transactions– Tracking– Data exchange– Custom

• Can be enabled by using code or config

Page 28: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Workflow Persistence Workflow Persistence

• Runtime calls service to persist workflow

• Upon event occurring, runtime will call service to load the workflow

WindowsWorkflow Foundation

Runtime Engine

Workflow

Runtime Services

Persistence serviceDatabase or or …

Write custom service to use any data store

Page 29: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

TransparencyTransparency

• Tracking service infrastructure, can track workflow, activity level events, as well as track custom data (PO amount)

• Workflow instances can be visualized and inspected graphically using designer

• State can be inspected and workflow visualized– Events– Tracking (push model)– Querying workflow state (pull model)

WindowsWorkflow Foundation

Runtime Engine

Workflow

Runtime Services

Tracking serviceDatabase or or …

Write custom service to use any data store

Page 30: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Data ExchangeData Exchange

• ExternalDataExchangeService allows host and workflow to communicate

• HandleExternalEvent and CallExternalMethod activities are used in the workflow to receive and send messages

• Messages are defined in contracts (interfaces)

Page 31: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

Using Runtime Services

Page 32: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

SummarySummary

• Single workflow technology• Human and system workflow scenarios• Framework for building workflow

into .NET applications• Sequential / state machine workflows• Common activities built in• Write custom activities• Rich runtime services

Page 33: Windows Vista for Syndication and Workflow Mike Ormond Developer & Platform Group, Microsoft Ltd mike.ormond@microsoft.com .

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

http://www.microsoft.com/uk/launch2007/dev/http://www.microsoft.com/uk/launch2007/dev/useful.mspxuseful.mspx