Introduction to windows workflow foundation (2007)

  • 208 views
Uploaded on

Introduction to Windows Workflow Foundation (2007) …

Introduction to Windows Workflow Foundation (2007)
ISEL, SINFO07
Bruno Câmara

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
208
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Windows WorkflowFoundation Bruno Câmara bruno.camara@agilior.pt http://www.agilior.pt/blogs/bruno.camara ISEL, Semana Informática 07 (2007)
  • 2. .Net 3.0 Showcase
  • 3. AgendaWhat is Windows Workflow Foundation?Architecture & Core conceptsBuilding WorkflowsIntroduction to ActivitiesWorkflow Styles
  • 4. Windows Workflow Foundation vision Windows Workflow Foundation is the programming model, engine and tools for quickly building workflow enabled applications on Windows. Single workflow technology for Windows Available to all customers of Windows Available for use across a broad range of scenarios Redefining workflow Extensible framework & API to build workflow centric products One technology for human and system workflow Take workflow mainstream Incremental learning for mainstream .NET developer Fundamental part of the Office 2007 Strong workflow partner & solution ecosystem
  • 5. .NET 3.0 and WF
  • 6. Workflow Scenario Spectrum Human Workflow System Workflow Participants: people, roles Participants: apps, services Flow style: flexible, dynamic Flow style: prescriptive, protocols Data: unstructured, documents Data: structured, transactional Information Worker Information Worker m M … C h n u p p a y g S tm M … C h n iu p p a y g lS t i l • • • Document Review… • Document Review… B n u B n u e e o s s s s s s tB n u iB iu n e e o s s s s s s t i i Line of Business Apps Line of Business Apps CRM ERP • Quote to Cash, Sales Automation… • Quote to Cash, Sales Automation… IT Management IT Management • New Hire Provisioning, Trouble Ticket,… • New Hire Provisioning, Trouble Ticket,… .NET Developer .NET Developer • Pageflow, Service Coordination… • Pageflow, Service Coordination… Windows Workflow Foundation
  • 7. Windows Workflow Foundation Visual DesignerKey Concepts Workflows are a set of Activities A Workflow Workflows run within a Host Process: any application or server Developers can build their own Custom An Activity Activity Libraries Custom Activity LibraryComponents Windows Base Activity Library: Out-of-box activities and base for custom activities Workflow Foundation Runtime Engine: Workflow execution and Base Activity Library state management Runtime Services: Hosting flexibility and Runtime Engine communication Visual Designer: Graphical and code-based Runtime Services construction Host Process
  • 8. Workflow Basics A workflow is a classusing System.Workflow.Activities;public class Workflow1 : SequentialWorkflow{} A workflow class may be defined in markup<?Mapping XmlNamespace="Activities" ClrNamespace="System.Workflow.Activities" Assembly="System.Workflow.Activities" ?><SequentialWorkflow x:Class="MyWorkflow" xmlns="Activities" xmlns:x="Definition"> …</SequentialWorkflow>
  • 9. Workflow Basics Workflow constructor configures contained activities (like forms & controls)using System.Workflow.Activities;public partial class Workflow1 : SequentialWorkflow { public Workflow1() { InitializeComponent(); }}public sealed partial class Workflow1 : SequentialWorkflow { private Delay delay1; private void InitializeComponent() { this.delay1 = new System.Workflow.Activities.Delay(); this.delay1.ID = “delay1"; this.delay1.TimeoutDuration = System.TimeSpan.Parse("00:00:05"); this.Activities.Add(this.delay1); this.ID = "Workflow1"; }}
  • 10. Workflow Authoring Modes Markup Only Markup and Code Only Application “Declarative” Code Generated App creates activity XAML XAML C#/VB C#/VB tree and serializes• XML defines • XML defines • Code createsworkflow structure workflow workflowlogic and data flow • Code-beside in constructor XAML C#/VB defines extra logic Workflow Compiler wfc.exe .NETassembly C#/VB Compiler • ctor defines workflow
  • 11. Building a Workflow
  • 12. What are Activities? An activity is a step in a workflow Has properties and events that are programmable within your workflow code Has methods (e.g. Execute) that are only invoked by the workflow runtime Think of Forms & Controls Activity == Controls Workflows == Forms Activities fall under two broad categories Basic – steps that “do work” Composite – manage a set of child activities
  • 13. Activities: An Extensible Approach Base Activity Custom Activity Domain-Specific Libraries Workflow Packages Library Compliance CRM Compose Extend activities activity Base Activity Library Author new RosettaNet activity IT MgmtOOB activities,workflow types, Create/Extend/base types Compose activities Vertical-specific activities & workflowsGeneral-purpose App-specific building blocks Best-practice IP &Activity libraries define Knowledgeworkflow constructs First-class citizens
  • 14. Expense ReportingWorkflow Application
  • 15. Flexible Control FlowSequential Workflow State Machine Workflow Sequential External Step1 structure Event State1 events drive prescribes processing Step2 Event State2 order processing order• Prescriptive, formal • Reactive, event-driven• Automation scenarios • Skip/re-work, exception• Flowchart metaphor handling • Graph metaphor Rules-driven Activities Rule1 Step1 Rules + data state Data drive processing Rule2 Step2 order • Data-driven • Simple Conditions, complex Policies • Constrained Activity Group
  • 16. A State MachineWorkflow
  • 17. Availability & Packaging Microsoft .Net Framework 3.0 Windows Communication Foundation (“Indigo”) Windows Presentation Foundation (“Avalon”) Windows Workflow Foundation (“WF”) Windows CardSpace Support for Windows XP & Windows Server 2003 Licensed as part of Windows
  • 18. Summary A single workflow technology for Windows Platform level workflow framework for use within Microsoft products & ISV applications Will be used by BizTalk Server, Office2007, MBS & other Microsoft client/server products Available to all Windows customers Microsoft is redefining workflow Unified technology for System & Human workflow Multiple styles: sequential, rules-based, state machine Supports dynamic interaction Microsoft is taking workflow mainstream Consistent and familiar programming model for reaching mainstream application developer Available to millions of end-users through Office 2007 Extensible platform for ISVs
  • 19. Windows Workflow FoundationResources MSDN Workflow Page ® Microsoft® Visual Studio® Extensions Download Hands-on Labs http://msdn.microsoft.com/workflow Community Site Subscribe to the RSS feed for news & updates Find, download, & register Activities Find blogs, screencasts, whitepapers, and other resources Download samples, tools, and runtime service components http://wf.netfx3.com/ Forums Ask questions in the forums http://www.WindowsWorkflow.net/Forums
  • 20. Q&A