Introduction to Windows Workflow Foundation
Andrei Oros
Andrei Oros
CTO - Flowster Solutions GmbH
andrei.oros@flowster.de
Computer Science Engineer
Master - Strategic Management
Agenda
Overview
Scenarios
Technology
Demo
What is Windows
Workflow Foundation ?
• Human Workflows
• Application Workflows
• Enterprise Integration Workflows
• Data Integration Workflows
...
Windows Workflow Foundation (WWF)
.NET technology for defining,
designing, hosting & running
processes as workflows .NET 4.5
.NET 3.5
.NET 3
.NET 4.6
.NET 4
WF 3x
WF 4, interop 3x
major improvements
minor updates
.NET 4
• Re-Architecture of Core Model, Runtime,
Hosting, Integration, Tooling
• Great Performance improvements
• Designer rehosting made easier
• Limited Compatibility with WF 3x (Interop)
WWF 4x highlights
.NET 4.5
Designer improvements
• Usability - designing, navigation
• Annotations - activities, vars, args
• C# expressions support
New Activities
State Machine
Workflow Services
Versioning
• Workflow Identity
• Dynamic Update
.NET 4.6
• small update - resume timeout interval for
non-protocol bookmarks
History
2006 - present
WWF vs BizTalk Server
Visual Studio
Windows Workflow
Foundation
.NET 3
WWF <-> .NET 3
BTS R2 - WWF & WCF
Interceptors
BTS Extensions WWF
SDK (2007)
btsSend & btsReceive
BizTalk Server 2006
Orchestration
Design Tools
Messaging
WF SDK & Interceptors
...
WF 4x, interop 3.5, 3
WF 3.5, 3
WF 3
When should we use WWF ?
Scenarios
• Long Running Business Logic
• Stateful Processes
• Often Changing Logic
• Transparency of Process & Execution
• Business Process Management Engines
• Integration - Middleware Layer
• Automation *
...
Examples
• Banking - credit req.
• HR - on/off boarding
• Purchasing - Orders
• Document Management
• IT Operations & Infrastructure
Management
...
Technology
Windows Workflow Foundation
Workflow
Runtime
Hosting
Tooling
Activity LibraryActivitiesWF Logic
Visual Studio Rehosted Designer PS Script Editors
Ext.TrackingPersistence
...
WorkflowServiceHost * WF ManagerWorkflowApplication
WF Invoker
Persistence
Definitions
Data Stores
Logs
WF App WF Svc
...
Workflow Types
Sequential Workflow
• intuitive
• linear logic
• loops (while, foreach)
• no "goto"
Flowchart Workflow
• very intuitive
• flow chart logic
• loops
• "goto" possible
State Machine Workflow
• easy to model
• state transitions + events​
• triggers​
Workflow
Authorship
Visual Studio
Rehosted Workflow Designer
Easy to Implement
• Designer
• Activities Toolbox
• Activity Properties
• Runtime
• Output
• Custom Tracking
...
Code
Declarative XAML
System.Activities.XamlIntegration
contains classes that provide
support for the serialization of
activities into XAML
Declarative XAML <-> Code
Powershell WF
PS v3
Workflow
Parallel
Foreach –parallel
Sequence
InlineScript
Checkpoint-workflow
Suspend-workflow
Powershell WF - Azure Automation
Runbooks - SMA
Powershell Workflow Windows PS Workflow text runbook
Graphical
Powershell Workflow based - managed
exclusively in Azure Portal GUI.
Powershell Windows PS Script text runbook
TechNet Gallery 130+ examples
Workflow Activities
& Activity Libraries
WWF Activity Libraries
Custom
Activity base class
CodeActivity execute, tracking, variables & args
NativeActivity + abort/cancel exec, bookmarks, ..
DynamicActivity DOM like - IcustomTypeDescriptor
WWF Custom Activity
WF Runtime & Hosting
Workflow Manager
Azure Logic Apps
*nix
Workflow Runtime & Hosting
WorkflowInvoker WorkflowApplication WorkflowServices
Simple Scenarios
No Hosting
Short Lived WFs
No Instance Control
No Persistence
No Bookmarks
Long Running WFs
Single Instance
Hosting
Instance Control
Persistence
Bookmarks
(Un)Loading
Long Running WFs
Multiple Instances
WorkflowServiceHost
Instance Control
Persistence
Bookmarks
Service Messaging
.NET
Framework
Workflow Execution Logs & Output
Tracking Records
Custom tracking participant
Result - Output(s)
Workflow Persistency
Data Stores
WorkflowIdentity
Definition <-> Instance
Scalability
Vertical
Horizontal
*Persistence
Workflow Manager
Authoring, Hosting & Management
• Azure & On Premise
• REST Endpoint & Client API
• Multi-tenancy (Scopes) & Scaling
• Management (DB Stores)
• Tracking and Monitoring
• Instance Management
• Fully Declarative Authoring
Custom Solution
WWF & Azure Logic Apps
• 2015 Q1
• JSON Definition
Language
• Visual Designer in
Web Browser
• Azure only, no On-
Premise version
What about *nix ?
OLIVE - experimental / incubation module
WF 3.5 - inactive | WF4 - no timeline
HostRuntimeWorkflowActivity
SSH SVC
Demo. Rehosted Workflow Designer
Conclusions
* Powerful Workflow Platform
* Enterprise Level
* Full Featured, Flexible
* Easy to Integrate & Extend
* Supported
Questions ?
Reference / Links
Windows Workflow Foundation
https://msdn.microsoft.com/en-us/vstudio/jj684582.aspx
What's new in WF 4.5
https://msdn.microsoft.com/en-us/library/hh305677.aspx
A Developer's Introduction to WWF
https://msdn.microsoft.com/en-us/library/ee342461.aspx
Workflow Manager
https://msdn.microsoft.com/en-us/library/jj193504(v=azure.10).aspx
Powershell Workflows & Azure Automation
https://azure.microsoft.com/en-us/documentation/articles/automation-graphical-authoring-intro/
WF 4x Code Samples
http://www.microsoft.com/en-us/download/details.aspx?id=21459
Rehosting the Workflow Designer
https://github.com/orosandrei/Rehosted-Workflow-Designer
Thank you.
Andrei Oros
hello@andreioros.com
linkedin.com/in/orosandrei
@orosandrei

Windows Workflow Foundation

  • 1.
    Introduction to WindowsWorkflow Foundation Andrei Oros
  • 2.
    Andrei Oros CTO -Flowster Solutions GmbH andrei.oros@flowster.de Computer Science Engineer Master - Strategic Management
  • 3.
  • 4.
  • 5.
    • Human Workflows •Application Workflows • Enterprise Integration Workflows • Data Integration Workflows ... Windows Workflow Foundation (WWF) .NET technology for defining, designing, hosting & running processes as workflows .NET 4.5 .NET 3.5 .NET 3 .NET 4.6 .NET 4 WF 3x WF 4, interop 3x major improvements minor updates
  • 6.
    .NET 4 • Re-Architectureof Core Model, Runtime, Hosting, Integration, Tooling • Great Performance improvements • Designer rehosting made easier • Limited Compatibility with WF 3x (Interop) WWF 4x highlights .NET 4.5 Designer improvements • Usability - designing, navigation • Annotations - activities, vars, args • C# expressions support New Activities State Machine Workflow Services Versioning • Workflow Identity • Dynamic Update .NET 4.6 • small update - resume timeout interval for non-protocol bookmarks
  • 7.
  • 8.
    WWF vs BizTalkServer Visual Studio Windows Workflow Foundation .NET 3 WWF <-> .NET 3 BTS R2 - WWF & WCF Interceptors BTS Extensions WWF SDK (2007) btsSend & btsReceive BizTalk Server 2006 Orchestration Design Tools Messaging WF SDK & Interceptors ...
  • 9.
    WF 4x, interop3.5, 3 WF 3.5, 3 WF 3
  • 10.
    When should weuse WWF ? Scenarios • Long Running Business Logic • Stateful Processes • Often Changing Logic • Transparency of Process & Execution • Business Process Management Engines • Integration - Middleware Layer • Automation * ... Examples • Banking - credit req. • HR - on/off boarding • Purchasing - Orders • Document Management • IT Operations & Infrastructure Management ...
  • 11.
  • 12.
    Windows Workflow Foundation Workflow Runtime Hosting Tooling ActivityLibraryActivitiesWF Logic Visual Studio Rehosted Designer PS Script Editors Ext.TrackingPersistence ... WorkflowServiceHost * WF ManagerWorkflowApplication WF Invoker Persistence Definitions Data Stores Logs WF App WF Svc ...
  • 13.
  • 14.
    Sequential Workflow • intuitive •linear logic • loops (while, foreach) • no "goto"
  • 15.
    Flowchart Workflow • veryintuitive • flow chart logic • loops • "goto" possible
  • 16.
    State Machine Workflow •easy to model • state transitions + events​ • triggers​
  • 17.
  • 18.
  • 19.
    Rehosted Workflow Designer Easyto Implement • Designer • Activities Toolbox • Activity Properties • Runtime • Output • Custom Tracking ...
  • 20.
  • 21.
    Declarative XAML System.Activities.XamlIntegration contains classesthat provide support for the serialization of activities into XAML
  • 22.
  • 23.
    Powershell WF PS v3 Workflow Parallel Foreach–parallel Sequence InlineScript Checkpoint-workflow Suspend-workflow
  • 24.
    Powershell WF -Azure Automation Runbooks - SMA Powershell Workflow Windows PS Workflow text runbook Graphical Powershell Workflow based - managed exclusively in Azure Portal GUI. Powershell Windows PS Script text runbook TechNet Gallery 130+ examples
  • 25.
  • 26.
    WWF Activity Libraries Custom Activitybase class CodeActivity execute, tracking, variables & args NativeActivity + abort/cancel exec, bookmarks, .. DynamicActivity DOM like - IcustomTypeDescriptor
  • 27.
  • 28.
    WF Runtime &Hosting Workflow Manager Azure Logic Apps *nix
  • 29.
    Workflow Runtime &Hosting WorkflowInvoker WorkflowApplication WorkflowServices Simple Scenarios No Hosting Short Lived WFs No Instance Control No Persistence No Bookmarks Long Running WFs Single Instance Hosting Instance Control Persistence Bookmarks (Un)Loading Long Running WFs Multiple Instances WorkflowServiceHost Instance Control Persistence Bookmarks Service Messaging .NET Framework
  • 30.
    Workflow Execution Logs& Output Tracking Records Custom tracking participant Result - Output(s)
  • 31.
    Workflow Persistency Data Stores WorkflowIdentity Definition<-> Instance Scalability Vertical Horizontal *Persistence
  • 32.
    Workflow Manager Authoring, Hosting& Management • Azure & On Premise • REST Endpoint & Client API • Multi-tenancy (Scopes) & Scaling • Management (DB Stores) • Tracking and Monitoring • Instance Management • Fully Declarative Authoring Custom Solution
  • 33.
    WWF & AzureLogic Apps • 2015 Q1 • JSON Definition Language • Visual Designer in Web Browser • Azure only, no On- Premise version
  • 34.
    What about *nix? OLIVE - experimental / incubation module WF 3.5 - inactive | WF4 - no timeline HostRuntimeWorkflowActivity SSH SVC
  • 35.
  • 37.
  • 38.
    * Powerful WorkflowPlatform * Enterprise Level * Full Featured, Flexible * Easy to Integrate & Extend * Supported Questions ?
  • 39.
    Reference / Links WindowsWorkflow Foundation https://msdn.microsoft.com/en-us/vstudio/jj684582.aspx What's new in WF 4.5 https://msdn.microsoft.com/en-us/library/hh305677.aspx A Developer's Introduction to WWF https://msdn.microsoft.com/en-us/library/ee342461.aspx Workflow Manager https://msdn.microsoft.com/en-us/library/jj193504(v=azure.10).aspx Powershell Workflows & Azure Automation https://azure.microsoft.com/en-us/documentation/articles/automation-graphical-authoring-intro/ WF 4x Code Samples http://www.microsoft.com/en-us/download/details.aspx?id=21459 Rehosting the Workflow Designer https://github.com/orosandrei/Rehosted-Workflow-Designer
  • 40.