Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint...

25
Hardcore Workflow 4 DEV404 Peter Goodman & Stef Sewell Lead Engineer, Software Architect ADERANT

Transcript of Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint...

Page 1: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Hardcore Workflow 4DEV404

Peter Goodman & Stef SewellLead Engineer, Software ArchitectADERANT

Page 2: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Agenda

Workflow Runtime

Workflow Service Host Extensibility

Scaling out workflow services with Windows Server AppFabric

Page 3: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Key Workflow ConceptsPDC09 – WF4 Inside Out

Programs are data(opacity begone)

Scheduler-based program execution(stackless & serializable)

Runtime-mediated code rendezvous(thou shalt not block the thread)

Natural control flow(run it the way you picture it)

Page 4: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Workflow RuntimeProgram Execution

Schedules execution of activity treesSingle threaded scheduler processing queue of work itemsUse async activities for I/O

Bookmarking Instance passivation to release resources Instance resumption on continuation / callback

Page 5: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

demo

Runtime Scheduler

Page 6: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Workflow RuntimeHousekeeping

Persistence of stateSerialize instance to disk / databaseCornerstone of scale-outExtensible

Emits tracking informationETW basedExtensible

Page 7: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Executing a Workflow

WorkflowInvoker.Invoke(Activity workflow)

WorkflowApplication app = new WorkflowApplication(Activity workflowDefinition)

myWorkflowService.xamlxWorkflowServiceHostScale out using Windows Server AppFabric

Page 8: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

WorkflowServiceHostFactoryFine grained control over…

WorkflowServiceHostFactory

Tracking Persistence

Custom Behaviour

Creation Endpoint

Control Endpoint

Exception Behaviour

Custom Extensions

Idle Behaviour

Security SerializationStateful Stateless

Creation Context

Page 9: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

demo

Workflow Service Host Factory

Page 10: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Windows Server AppFabricEnterprise class service hosting on premise

Workflow Management ServiceWorkflow Instance LockSQL Server 2008 Persistence Provider

Windows Server extension that provides the elastic scale-outof workflow services across a load balanced cluster.

Page 11: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Workflow Persistence Settings

Page 12: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Workflow Persistence SettingsScale-out configuration

Page 13: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Scaling out WF & WCF ServicesConfigure Programmatically via PowerShell

PS> import-module ApplicationServerPS> get-command –module ApplicationServer

# PowerShell OnlyPS> Set-ASMonitoringDatabaseArchiveConfiguration

Page 14: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

IIS

Scaling out WF & WCF ServicesSetting up Kerberos for Windows Authentication

Load Balancer

webapplication

service.svc

AppPoolAPP1 machine account

loadbalancer.domain.local

IIS

webapplication

service.svc

AppPoolAPP2 machine account

APP1

APP2

Page 15: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

IIS

Scaling out WF & WCF ServicesSetting up Kerberos for Windows Authentication

Load Balancer

webapplication

service.svc

AppPoolDomain\service account

loadbalancer.domain.local

IIS

webapplication

service.svc

AppPoolDomain\service account

APP1

APP2

Page 16: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Scaling out WF & WCF ServicesAdding the SPN

setspn –a HTTP/loadbalancer.domain.local serviceAccount

Page 17: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Scaling out WF & WCF ServicesIIS Configuration

appcmd set config /section:windowsAuthentication /useAppPoolCredentials:true

appcmd set config /section:windowsAuthentication /authPersistNonNTLM:true

Page 18: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Scaling out WF & WCF ServicesInternet Zone Security

Page 19: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Wrap up

Single-threaded scheduler – use Async I/O

WorkflowServiceHostFactory allows extensive customization of the WorkflowServiceHost

Windows Server AppFabric allows enterprise scale out of workflow services

Page 20: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

questions

Page 21: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Related Content

Breakout Sessions (session codes and titles)

Breakout Sessions (session codes and titles)

Breakout Sessions (session codes and titles)

Breakout Sessions (session codes and titles)

Breakout Sessions (session codes and titles)

Find Me Later At…

Page 22: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Track Resources

Resource 1

Resource 2

Resource 3

Resource 4

Page 23: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Resources

Microsoft Certification & Training Resources

Resources for IT Professionals Resources for Developers

www.microsoft.com/learning

http://microsoft.com/technet http://microsoft.com/msdn

Learning

http://newzealand.msteched.com

Connect. Share. Discuss.

Page 24: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

Evaluate your sessionson CommNet and go inthe draw to win instantprizes

Page 25: Sample Fill demo WorkflowServiceHostFactory Tracking Persistence Custom Behaviour Creation Endpoint Control Endpoint Exception Behaviour.

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