Windows Workflow Foundation Building Workflowbased Applications - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Windows Workflow Foundation Building Workflowbased Applications

Description:

ICC Gent. 2. Christian Weyer and. Support and consulting services for software developers and architects ... My area of expertise are distributed applications, ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 27
Provided by: downloadM
Category:

less

Transcript and Presenter's Notes

Title: Windows Workflow Foundation Building Workflowbased Applications


1
Windows Workflow Foundation Building
Workflow-based Applications
  • Christian Weyer
  • thinktecture
  • christian.weyer_at_thinktecture.com
  • 7 8 March 2006
  • ICC Gent

2
Christian Weyer and
  • Support and consulting services for software
    developers and architects
  • Renowned experts in todays technologies
  • We track future technologies and work closely
    with Microsoft
  • My area of expertise are distributed
    applications, Web Services in particular, Web
    Services interoperability and all things service
    orientation
  • http//www.thinktecture.com
  • christian.weyer_at_thinktecture.com
  • Independent Microsoft Regional Director for
    Germany
  • Microsoft MVP for Solution Architecture

3
Agenda
  • Session Objectives
  • Introduce Windows Workflow Foundation
  • Relate Developer Workflow Scenarios
  • A workflow is an implementation of a business
    process
  • An activity is a step in a workflow
  • WF gives developers a base to start from
  • WF is a framework for developers

4
Workflow Software Challenges
Software Challenges
Real World Behavior
Long Running and Stateful Workflows run for up to
30 days and must maintain state throughout
Orders are confirmed in 48 hours and shipped
within 30 days
Most suppliers confirm our orders but some
forget and we need to followup
Flexible Control Flow Flexibility for people to
override or skip steps in the workflow
Transparency Rendering runtime state within a
visualization of the workflow control flow
What is the status of this order and what is the
next step?
5
Why Workflow Technology?
6
Microsofts Workflow Strategy is
  • to provide Windows Workflow Foundation as a part
    of the developer framework for Windows
  • and enterprise applications that build on top of
    Windows Workflow Foundation for specific
    scenarios.

For Example
  • A ISV developer building a line of business
    application chooses to use Windows Workflow
    Foundation within the business logic of their
    application.
  • An enterprise customer uses BizTalk Server to
    provide system workflow across their existing
    line of business applications and trading
    partners to reduce their cycle-times and increase
    business visibility in a high-volume environment.

For Example
7
Windows Workflow Foundation
  • Single workflow technology for Windows
  • Available to all customers of Windows initially
    part of WinFX
  • 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 12 value
    proposition
  • Strong workflow partner solution ecosystem

8
What is a workflow?
A set of activities that coordinate people and /
or software...
EscalateToManager
CheckInventory
Example activities.
organized into some form of workflow.
Or a state diagram.
Like a flowchart.
9
Workflow Scenario Spectrum
  • Participants people, roles
  • Flow style flexible, dynamic
  • Data unstructured, documents
  • Participants apps, services
  • Flow style prescriptive, protocols
  • Data structured, transactional

10
Windows Workflow Foundation
Visual Designer
  • Key Concepts

A Workflow
  • Workflows are a set of Activities
  • Workflows run within a Host Process any
    application or server

An Activity
  • Developers can build their own Custom Activity
    Libraries

Custom Activity Library
Components
Windows Workflow Foundation
  • Base Activity Library Out-of-box activities and
    base for custom activities

Base Activity Library
  • Runtime Engine Workflow execution and state
    management

Runtime Engine
  • Runtime Services Hosting flexibility and
    communication

Runtime Services
  • Visual Designer Graphical and code-based
    construction

Host Process
11
Developer Ecosystem
Workflow Developers
Minimal coding, full authoring environment
Application
Workflows
Flow Logic
Host Application
Host Developers
Application services host
Custom Activities
Runtime
Services
Out-of-box and/or Custom Services
Activity Developers
Custom execution validation logic
12
Workflow Basics
  • A workflow is a class
  • A workflow class may be defined in markup

Imports System.Workflow.Activities Public Class
MyWorkflow Inherits SequentialWorkflow
End Class
lt?Mapping XmlNamespace"Activities"
ClrNamespace"System.Workflow.Activities"
Assembly"System.Workflow.Activities"
?gt ltSequentialWorkflow xClass"MyWorkflow"
xmlns"Activities" xmlnsx"Definition"gt
lt/SequentialWorkflowgt
13
Workflow Authoring Modes
Application Generated
Markup Only Declarative
Markup and Code
Code Only
App creates activity tree and serializes

XAML
XAML
  • Code creates
  • workflow
  • in constructor
  • XML defines
  • workflow
  • Code-beside
  • defines extra logic
  • XML defines
  • workflow structure
  • logic and data flow

XAML
Workflow Compiler wfc.exe
  • .NET assembly
  • ctor defines
  • workflow

C/VB Compiler
14
Activity Basics
  • Activities are the building blocks of workflows
  • The unit of execution, re-use and composition
  • Basic activities are steps within a workflow
  • Composite activities contains other
    activitiese.g. Sequence
  • Base Activity Library provides out-of-the-box
    activity set
  • Partners and customers author custom
    activitiese.g. ApproveOrder domain-specific
    activities
  • Activities are classes
  • Properties and events are defined by the
    activityauthor and programmable from workflows
  • Has methods that are coded by the activity
    authorbut invoked by the workflow runtime (e.g.
    Execute) or designer
  • Can be built into workflow assemblies or deployed
    asre-usable libraries

15
Activities Optional Features
Companion Classes
Designer
Designer(typeof(MyDesigner)) Validator(typeof(
MyValidator)) CodeGenerator(typeof(MyCodeGen))
Serializer(typeof(MySerializer)) ToolboxItem(ty
peof(MyToolboxItem))
Validator
Serializer
Code Generator
ToolboxItem
Behaviors
SupportsTransaction SupportsExceptionHandlers
Transactions
public class MyActivity Activity ...
16
Activities An Extensible Approach
Base Activity Library
Custom ActivityLibraries
Out-of-Box Activities
  • OOB activities,workflow types,base types
  • General-purpose
  • Activity libraries define workflow constructs
  • Create/Extend/Compose activities
  • App-specificbuilding blocks
  • First-class citizens

Sequencing engine driven by activities (no fixed
language)
17
Flexible Control Flow
State Machine Workflow
Sequential Workflow
External events drive processing order
Sequential structure prescribes processing order
Step1
Event
Step2
Event
  • Prescriptive, formal
  • Automation scenarios
  • Flowchart metaphor
  • Reactive, event-driven
  • Skip/re-work, exception handling
  • Graph metaphor

Rules-driven Activities
Rule1
Step1
Rules data state drive processing order
Data
Step2
Rule2
  • Data-driven
  • Simple Conditions, complex Policies
  • Constrained Activity Group

18
Interacting with/from a Workflow
  • Properties
  • Local Services
  • Interface-based .NET communication
  • One-way methods and events
  • Communication Activities
  • Web Services
  • Receive, Send, Invoke
  • WCF
  • There will be support for WF and WCF
  • Custom Activities
  • Using Workflow queue

19
Data Exchange withLocal Services Illustrated
20
Runtime Engine And Services
My workflow
Windows Workflow Foundation
  • Base Activity Library

Application
21
Runtime Services
Host Application
App Domain
PersistenceService stores and retrieves instance
state
Runtime
Services
Out of Box Services are provided that support SQL
Server/MSDE
PersistenceService
TrackingService manages profiles and stores
tracked information
TrackingService
SchedulerService
Common resource services for managing threading
and creating transactions
TransactionService
22
Take Workflow Mainstream Design
  • Workflow Designers
  • (À la ASP.NET Designer)
  • Create new workflows
  • Visual (/code) authoring
  • Seamlessly integrate .NET code with
    round-tripping
  • Visual debugging
  • Themes support
  • Designer re-hosting

Consistent and Familiar Experience for Workflow
Development
23
Workflow and BizTalk Server
BizTalk Server
  • Premium BPM server
  • Distinct server product
  • Use in B2B, EAI, BPM scenarios
  • Deployable solutions
  • Manageability, Scale-out

Business Activity Monitor And Admin Tools
Accelerators
Design Tools
Workflow
Orchestration
Messaging
Transformation
  • Future version will migrate to Windows Workflow
    Foundation for orchestration

Adapters
  • Workflow framework
  • Exposed via WinFX
  • Broad set of scenarios
  • Used to build solutions
  • Enables manageability
  • and scale-out in solutions
  • Use for building workflow into apps or
    workflow-enabled servers

Visual Studio Designer
WinFX
Windows Workflow Foundation
24
Resources
  • WinFX Developer Center
  • http//msdn.microsoft.com/winfx/
  • WF
  • http//www.windowsworkflow.net/
  • Blog Christian Weyer
  • http//blogs.thinktecture.com/cweyer/

25
http//www.thinktecture.com/ christian.weyer_at_thin
ktecture.com http//blogs.thinktecture.com/cweyer
/
26
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com