Introduction to Windows Workflow FoundationAndrei Oros
Andrei OrosCTO - Flowster Solutions [email protected]
Computer Science EngineerMaster - Strategic Management
Agenda
OverviewScenariosTechnologyDemo
What is Windows Workflow Foundation ?
• Human Workflows• Application Workflows• Enterprise Integration Work-
flows• Data Integration Workflows...
Windows Workflow Foundation (WWF).NET technology for defining, designing, host-ing & running processes as workflows
.NET 4.5
.NET 3.5
.NET 3
.NET 4.6
.NET 4
WF 3x
WF 4, interop 3x
major improve-ments
minor updates
.NET 4• Re-Architecture of Core Model,
Runtime, Hosting, Integration, Tool-ing
• Great Performance improvements• Designer rehosting made easier• Limited Compatibility with WF 3x
(Interop)
WWF 4x highlights.NET 4.5Designer improvements • Usability - designing, naviga-
tion• Annotations - activities, vars,
args• C# expressions supportNew ActivitiesState MachineWorkflow ServicesVersioning• Workflow Identity• Dynamic Update
.NET 4.6• small update - resume timeout in-
terval for non-protocol bookmarks
History2006 - present
WWF vs BizTalk ServerVisual Studio
Windows WorkflowFoundation
.NET 3
WWF <-> .NET 3
BTS R2 - WWF & WCFInterceptors
BTS Extensions WWF SDK (2007)btsSend & btsRe-ceive
BizTalk Server 2006
Orchestration
Design Tools
Messaging
WF SDK & Intercep-tors
...
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 & Infrastruc-
ture Management...
Technology
Windows Workflow FoundationWorkflow
Runtime
Hosting
Tooling
Activity LibraryActivi-tiesWF Logic
Visual Studio Rehosted Designer PS Script Editors
Ext.TrackingPersis-
tence
...
WorkflowService-Host
* WF Man-ager
WorkflowApplica-tion
WF In-vokerPersistence
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 DesignerEasy to Implement
• Designer• Activities Toolbox• Activity Properties• Runtime• Output• Custom Tracking...
Code
Declarative XAMLSystem.Activities.XamlInte-gration
contains classes that provide support for the serialization of activities into XAML
Declarative XAML <-> Code
Powershell WFPS v3Workflow
Parallel
Foreach –parallel
Sequence
InlineScript
Checkpoint-workflow
Suspend-workflow
Powershell WF - Azure AutomationRunbooks - SMA
Powershell Workflow Windows PS Workflow text runbook
GraphicalPowershell Workflow based - managed exclusively in Azure Portal GUI.
Powershell Windows PS Script text runbook
TechNet Gallery 130+ ex-amples
Workflow Activities & Activity Libraries
WWF Activity LibrariesCustom
Activity base classCodeActivity execute, tracking, variables &
argsNativeActivity + abort/cancel exec, bookmarks,
..DynamicActivity DOM like -
IcustomTypeDescriptor
WWF Custom Activity
WF Runtime & HostingWorkflow ManagerAzure Logic Apps*nix
Workflow Runtime & HostingWorkflowIn-
vokerWorkflowAppli-
cationWorkflowSer-
vicesSimple ScenariosNo HostingShort Lived WFs
No Instance Con-trolNo PersistenceNo Bookmarks
Long Running WFsSingle InstanceHosting
Instance ControlPersistenceBookmarks(Un)Loading
Long Running WFsMultiple InstancesWorkflowService-Host
Instance ControlPersistenceBookmarksService Messaging
.NETFrame-
work
Workflow Execution Logs & Output
Tracking RecordsCustom tracking participant Result - Output(s)
Workflow PersistencyData Stores
WorkflowIdentityDefinition <-> In-stance
ScalabilityVerticalHorizontal*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 moduleWF 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 / LinksWindows Workflow Foundationhttps://msdn.microsoft.com/en-us/vstudio/jj684582.aspx
What's new in WF 4.5https://msdn.microsoft.com/en-us/library/hh305677.aspx
A Developer's Introduction to WWFhttps://msdn.microsoft.com/en-us/library/ee342461.aspx
Workflow Managerhttps://msdn.microsoft.com/en-us/library/jj193504(v=azure.10).aspx
Powershell Workflows & Azure Automationhttps://azure.microsoft.com/en-us/documentation/articles/automation-graphical-authoring-intro/
WF 4x Code Sampleshttp://www.microsoft.com/en-us/download/details.aspx?id=21459
Rehosting the Workflow Designerhttps://github.com/orosandrei/Rehosted-Workflow-Designer
Thank you.Andrei Oros
[email protected]/in/orosandrei@orosandrei