Wee Hyong [email protected]working out with Windows Workflow Foundation Windows Workflow Foundation Windows Workflow Foundation Windows Workflow Foundation Agenda Intro to Workflow Foundation Workflow Basics Different ways of authoring workflows Demos - WF Designer - Sequential Workflow - State Machine Workflow - Embedded WF Desinger Control Looking forward …. Conclusion What is a workflow? Workflow is the operational aspect of a work procedure: how tasks are structured, who performs them, what their relative order is, how they are synchronized, how information flows to support the tasks and how tasks are being tracked Src: http://en.wikipedia.org/wiki/Workflow Modeled as a flowchart Modeled as a flowchart … … . . Or a state diagram Or a state diagram … … . . Workflow Scenario Spectrum • Participants: people, roles • Flow style: flexible, dynamic • Data: unstructured, documents • Participants: apps, services • Flow style: prescriptive, protocols • Data: structured, transactional Information Worker • Document Review… Information Worker • Document Review… System Workflow Human Workflow Windows Workflow Foundation Business to Business • Supply Chain Mgmt… Business to Business • Supply Chain Mgmt… Line of Business Apps • Quote to Cash, Sales Automation… Line of Business Apps • Quote to Cash, Sales Automation… CRM ERP IT Management • New Hire Provisioning, Trouble Ticket,… IT Management • New Hire Provisioning, Trouble Ticket,… .NET Developer • Pageflow, Service Coordination… .NET Developer • Pageflow, Service Coordination… Src: COM210 Introduction to Workflow in Windows Applications (Bill Devlin and Paul Andrew)
10
Embed
working out with Windows Workflow Foundationsanthoshgudise.weebly.com/uploads/8/5/4/7/8547208/intro-to-wwf.pdf · Intro to Workflow Foundation Workflow Basics Different ways of authoring
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Windows Workflow FoundationWindows Workflow Foundation
Windows Workflow FoundationWindows Workflow FoundationAgenda
Intro to Workflow FoundationWorkflow BasicsDifferent ways of authoring workflowsDemos- WF Designer- Sequential Workflow- State Machine Workflow- Embedded WF Desinger Control
Looking forward ….Conclusion
What is a workflow?Workflow is the operational aspect of a work procedure: howtasks are structured, who performs them, what their relativeorder is, how they are synchronized, how information flowsto support the tasks and how tasks are being tracked
Steps• Instantiate the WorkflowRuntime• Start the Runtime• Start the workflow• Wait for completion• Stop the Runtime
VS.NET 2005Simple Sequential Workflow
Workflow Communications with .Net
• To support the interaction– Define a contract for communication (.Net interface) – Register the implementation of the interface with the workflow
runtime • Workflow runtime mediates between the exchange of
events between worfklow instance and the .Net application• Queues used to exchange information between the host
application and the workflow– Key: The separation, or proxy layer allows workflow instance to
hydrate and dehydrate without using any in-memory references that may be held by host application.
WF Communication Stack
DistributedApplication Host
Message Queues
LocalApplication Host
LocalCommunication
Service
DataActivities
Web Services
Data activities vs Local Services
• Data activities– Payload of the information being transferred
must be of the same Type or Object class– Two built-in events: data queries and data saves
• Local Services– Inbound payload does not have not match the
outbound payload– Unlimited events
Communication between .Net application and workflow instance
Data Activities
State-Machine Workflow
Dehydration vs RehydrationWorkflow InstancesWorkflow Instances
UnloadLoad
• To allow workflow instances to be durable across restarts of the Workflowruntime or the host applications
• Persistence Service (i.e. SqlStatePersistenceService) provides the ability to persist and restore the entire state of a workflow instance to a durable data source (e.g. SQL Server, file)
Looking forward…..
ApplicationApplication
WWF RuntimeWWF Runtime
Developer Ecosystem
WorkflowsWorkflows
Workflow DevelopersWorkflow DevelopersMinimal coding, full authoring Minimal coding, full authoring environmentenvironment
Src: COM327, Hosting and Communications in Workflow Scenarios, Israel Hilerio, Ph.D. Program Manager Microsoft Corporation
WF in Action –Office 12
Workflow Designer(Professional Developer)
- Design workflow schedule,activities, forms and code
in Visual Studio- Compiles Schedule into assemblies
Workflow Designer(Knowledge Worker)
- Design no-code workflow schedule (based on pre-trusted activities) in FrontPage
- Workflow is compiled the first time it is run
SharePoint List or Site Administrator
- Associate a workflow with a list, document library or content type making it available to
items in that scope- Complete a workflow specific association form
which parameterizes the workflow
End User Initiator- Office or Sharepoint user starts a worfklow manually
through menu commands or automatically by creating an item or changing an item
End User Participant- Receive a task notification through email
- Complete the task using a task form from within Sharepoint or Office
Some activities omitted
BizTalk Server
MessagingMessagingDesignDesignToolsTools
BusinessBusinessActivityActivityMonitorMonitor
AndAndAdminAdminToolsTools
OrchestrationOrchestration
TransformationTransformation
AdaptersAdapters
BizTalk ServerAcceleratorsAccelerators
•• Future version will migrate to Windows Future version will migrate to Windows Workflow Foundation for orchestrationWorkflow Foundation for orchestration