kenny wolf architect wcf and wf

26
WF 4.0: A First Look Kenny Wolf Architect WCF and WF http://kennyw.co m/

Upload: suzanna-cox

Post on 05-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Kenny Wolf Architect WCF and WF

WF 4.0: A First Look

Kenny WolfArchitectWCF and WFhttp://kennyw.com/

Page 2: Kenny Wolf Architect WCF and WF

Agenda

WF Basics Why, where, and when to use WF Other WF 4.0 Improvements

Page 3: Kenny Wolf Architect WCF and WF

Host (.exe, IIS/WAS, .NET Services, …)

WF Runtime Extensions

Tracking

Persistence

What is WF?

WF programs coordinate work with minimal ceremony

Activities Runtime Tooling

ToolingVS

DesignerVS

DebuggerRehosted Designer

WorkflowActivity Library

Page 4: Kenny Wolf Architect WCF and WF

Activities are the primitive abstraction for behaviorActivities are composable with other ActivitiesActivities have user-defined Variables for data storageActivities bind Arguments to in-scope VariablesActivities define Arguments to declare the type of data that can flow into or out of an ActivityState Machine

Parallel

Sequence

Activities

Send Message

Delay Receive Message

Generate Order

InArgument<TimeSpan>

OutArgument<Order>

InArgument<Message>

OutArgument<Message>

Process Order

Send Report

Variables

Variables

Variables

Page 5: Kenny Wolf Architect WCF and WF

Control Flow Activities

Flowchart Sequential State Machine Rules

Activity Library

Custom Activities

SharePoint Dynamics Systems Center HPC Team Foundation

Server<YOUR CODE HERE>Base Activity Library

WCF Messaging

Database PowerShell

Error HandlingExpressions

Interop

Utilities

WF Primitives

BPEL

Page 6: Kenny Wolf Architect WCF and WF

WF Overview

demo

Page 7: Kenny Wolf Architect WCF and WF

Why WF?

Coordinate Work Write Persistable Applications Gain Visibility into your Application Customizable Vocabulary & Design Experience

Page 8: Kenny Wolf Architect WCF and WF

Codevoid GetPassword(string password){ bool haveUser = State.Get("haveUser"); if (!haveUser) { throw new Exception(); } string user = State.Get("User"); Validate(user, password);}

Codevoid GetPassword(string password){

Validate(user, password);}

Codevoid GetUser(string user){ // validate haven't gotten user yet bool haveUser = State.Get("haveUser"); if (haveUser) { throw new Exception(); } State.Set("haveUser", true); State.Set("User", user);}

Codevoid GetUser(string user){

}

Code

{ string user = Console.ReadLine(); string password = Console.ReadLine(); Validate(user, password);}

Control Flow

string user = State.Get("User");

State

Coordinate Work

Input

State.Set("User", user);Input

State InputControl Flow (More Code, More State)

Page 9: Kenny Wolf Architect WCF and WF

Persistable Applications

Win32 Processes are volatile, your state does not have to be

If your application is not doing anything, someone else can use the memory

Page 10: Kenny Wolf Architect WCF and WF

Persistable Applications

Workflows are persistence-enabled for free If you need control, it's available to you

Persistence Provider determines format and store

Typically controlled by the host Explicit persistence points in WF through Persist

activity Support for No-Persist Zones Host Extensions can participate in persistence

WF adapts to mid-stream process changes

Page 11: Kenny Wolf Architect WCF and WF

Persistable Applications

demo

Page 12: Kenny Wolf Architect WCF and WF

Visibility into your Application

Software autopsies are hard ITPro calls dev: What's going on? Business stakeholder calls dev: What's going

on? How do I capture key performance data? Dev: What's going on? What is my program

waiting on?

Page 13: Kenny Wolf Architect WCF and WF

Visibility into your Application

Workflows are tracking-enabled for free Tracking Profiles allow for rich queries over

application state Tracking Participants determine format and

store Integrated with Windows E2E Tracing

Can schematize persistence state Rich debugging for running instances

Page 14: Kenny Wolf Architect WCF and WF

WF 4.0 vs. WF 3.0

Activity Authoring is simpler and takes much less code Fully declarative workflows and activities Alignment across Expressions, Rules, and Activities Seamless Composition Across Flow Styles

Runtime 10-100X Performance Improvements Full control over persistence Flow-in Transactions Partial Trust Support Integrates with WCF, WPF, ASP.NET

Tools Designer Performance and Usability Rehosting Improvements Unified Debugging Experience

And much much more….

Page 15: Kenny Wolf Architect WCF and WF

Preparing for WF 4.0

3.0/3.5 workflows continue to work (on the 3.0 WF runtime)

Can use 3.0 Activities within a 4.0 Workflow Guidance on how to prepare 3.0/3.5 code

Page 16: Kenny Wolf Architect WCF and WF

Preparing for WF 4.0

demo

Page 17: Kenny Wolf Architect WCF and WF

"Trident" Scientific WorkflowJared Jackson

Microsoft Research

Partner

Page 18: Kenny Wolf Architect WCF and WF

PanSTARRs(Astronomy)

Neptune(Oceanography)

Scientific Workflows

Large Scale Sensor Networks

On demand visualizations Catalog of activities

Load/Merge Databases Execute on Clusters Monitor workflow execution Logging, Provenance, Faults

Page 19: Kenny Wolf Architect WCF and WF

"Trident" – Workflow Composition

Composition Space

Activity Library

Workflow Library

Data Options & Sharing

Page 20: Kenny Wolf Architect WCF and WF

<Jump> <Jump.Target> <Dog Type="Lazy"> </Jump.Target> <Fox Color="Brown" Type="Quick">

<Jump>

The quick brown fox jumps over the lazy dog

Page 21: Kenny Wolf Architect WCF and WF

Textual Activity Authoring

demo

Page 22: Kenny Wolf Architect WCF and WF

Summary

WF is: Activities Runtime Tooling

WF helps you: Coordinate Work Write Persistable Applications Gain Visibility into your Application Customize your Vocabulary & Design Experience

Page 23: Kenny Wolf Architect WCF and WF

Resources

Breakout Sessions TL21 - WF 4.0: Extending with Custom Activities TL06 - WCF 4.0: Building WCF Services with WF BB18 - "Dublin": Hosting and Managing Workflows

and Services BB27 - Orchestrating Services and Business

Processes Using Cloud-Based Workflow TL36 - Declarative Programming Using XAML BB57 - Dynamics AX: Building Business Process into

your Application http://blogs.msdn.com/endpoint/ http://msdn.microsoft.com/wf/future/ Questions to [email protected]

Page 24: Kenny Wolf Architect WCF and WF

Evals & Recordings

Please fill

out your

evaluation for

this session at:

This session will be available as a recording at:

www.microsoftpdc.com

Page 25: Kenny Wolf Architect WCF and WF

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

Page 26: Kenny Wolf Architect WCF and WF