building event driven long running apps with windows workflow l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Building event-driven, long-running apps with Windows workflow PowerPoint Presentation
Download Presentation
Building event-driven, long-running apps with Windows workflow

Loading in 2 Seconds...

play fullscreen
1 / 38

Building event-driven, long-running apps with Windows workflow - PowerPoint PPT Presentation


  • 163 Views
  • Uploaded on

TOOL-801T. Building event-driven, long-running apps with Windows workflow. Ron Jacobs Sr. Program Manager Microsoft Corporation. www.ronjacobs.com. Agenda. Some thoughts on "event-driven" and "long-running" Two Server Scenarios Job Application Mortgage Application One Client Scenario

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Building event-driven, long-running apps with Windows workflow' - radwan


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
building event driven long running apps with windows workflow
TOOL-801T

Building event-driven, long-running apps with Windows workflow

Ron Jacobs

Sr. Program Manager

Microsoft Corporation

www.ronjacobs.com

agenda
Agenda
  • Some thoughts on "event-driven" and "long-running"
  • Two Server Scenarios
    • Job Application
    • Mortgage Application
  • One Client Scenario
    • ATM Machine
event driven
Event Driven

Something Happens

Something Responds

Work gets done

event driven4
Event Driven

Query status for order

Query database and return status

Display status to user

event driven long running
Event Driven / Long Running

Submit Job Application

Save in database and return ID

Display ID for user

Send Email to HR

Wait…

No response

Send another mail

Wait…

HR responds to email

Save in database and return status

Send Email to applicant

Complete

activity
Activity
  • Authored in XAML
  • Composition of other activities
  • Distribution
    • Compiled into an assembly with generated helpers
    • Loaded from stream (file system, database, service etc.)
activity9
Activity
  • publicclassDebugTrace : CodeActivity{
  • publicInArgument<string> Text { get; set; }
  • protectedoverridevoidExecute(CodeActivityContext context)      {Debug.WriteLine(Text.Get(context));     
  • }
  • }
control flow
Control Flow

Which one should I use?

Control

React

Flowchart

Sequence

State Machine

a lap around wf 4 5 key new features
A Lap Around WF 4.5Key new features

Authoring Improvements

Versioning

Runtime Enhancements

application process
Application Process

Education

Service

Applicant

1

Applicant

Service

HR Data

2

Persistence

3

6

4

Reviewer

5

AppFabric Cache

wf 3 5 persistence
WF 3.5 Persistence

Workflow Definition

(XAML)

Workflow Definition

(XAML)

Instance Data

Instance Data

Instance Store

wf 4 persistence
WF 4 Persistence

Workflow Definition

(XAML)

Instance Data

Instance Data

Instance Store

wf 4 persistence18
WF 4 Persistence

Exception (?)

Workflow Definition

(XAML)

Workflow (v2)

Instance Data (v?)

Instance Data

Instance Store

wf 4 persistence19
WF 4 Persistence

Workflow (v2)

Instance Data (v?)

Instance Data

Instance Store

workflow identity
Workflow Identity

“My Workflow”1.0.0.0

Instance Data for

“My Workflow”

1.0.0.0

Instance Data (1.0.0.0)

Instance Store

workflow identity21
Workflow Identity

Exception

(Version Mismatch)

“My Workflow”1.0.0.0

“My Workflow”2.0.0.0

Instance Data for

“My Workflow”

1.0.0.0

Instance Data (1.0.0.0)

Instance Store

workflowidentity
WorkflowIdentity
  • var identity = newWorkflowIdentity("My Workflow", newVersion(1, 0, 0, 0));
  • var workflow = newWorkflowApplication(newActivity1(), identity);
  • workflow.Run();
workflowapplicationinstance
WorkflowApplicationInstance
  • // get the instance data but do not bind to definition
  • varinstance = WorkflowApplication.GetInstance(instanceId, instanceStore);
  • // get the definition associated to the identity
  • vardefinition = definitions[instance.DefinitionIdentity];
create update map
Create Update Map

“My Workflow”1.0.0.0

“My Workflow”2.0.0.0

apply update map
Apply Update Map

Instance Data for

“My Workflow”

2.0.0.0

Instance Data for

“My Workflow”

1.0.0.0

dynamic update
Dynamic Update
  • // Create the update map
  • DynamicUpdateMapmap = DynamicUpdateServices.CreateUpdateMap(definition);
dynamic update28
Dynamic Update
  • instance = WorkflowApplication.GetInstance(id, CreateInstanceStore());
  • application = newWorkflowApplication(targetActivity, targetIdentity);
  • // apply the update to the instance
  • application.Load(instance, this.currentUpdateMap);
  • application.Unload();
atm state machine
ATM State Machine
  • Model business process as a series of states and transitions
  • Example from State Machine Hands On Lab
  • WPF Application
  • Model / View / View Model pattern
http messaging
HTTP Messaging
  • Request / response messaging built on the WCF WebApi stack
  • Prototype available
    • http://wf.codeplex.com
for more information
For more information

RELATED SESSIONS

DOCUMENTATION & ARTICLES

  • Workflow and Windows Azure
  • What's New with Workflow 4.5
  • Activities, Extensions, Tools available at
  • http://wf.CodePlex.com
feedback and q uestions http forums dev windows com session f eedback http bldw in sessionfeedback
thank you

Feedback and questions http://forums.dev.windows.com

Session feedbackhttp://bldw.in/SessionFeedback

slide37

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