http://stiller.co.il/blog/2013/03/wf-4-5-and-code-contracts-slide-decks-and-code/
Windows Workflow Foundation (WF) is Microsoft's .NET implementation of a Workflow authoring and hosting environment. With WF 4.5 developers can easily author workflows using the Visual-Studio built-in WF designer, host them in multiple application environments using the provided runtime engine and even expose them as services for the outside world to consume. Oh, and it's totally free…
In this session we'll focus on the cool new features which version 4.5 brings to the table with demonstrations including Workflow Versioning, C# expressions, designer improvements and contract-first workflow development. If you ever thought about using WF - this session is for you.
TeamStation AI System Report LATAM IT Salaries 2024
What’s New in Windows Workflow Foundation (WF) 4.5?
1. WF 4.5
What’s New in Windows Workflow 4.5?
Eran Stiller
Senior Software Architect,
Founder
March 20, 2013
2. About Me
• Software architect, consultant and instructor
• Technology addict
• 10 years of experience
• .NET and Native Windows Programming
• Specializes in large-scale, server-side, highly-concurrent systems
• Co-Founder at CodeValue Ltd.
• http://stiller.co.il/blog
3. Agenda
• What is WF?
• New in WF 4.5
– Workflow Identity & Versioning
– Contract-First Workflow Service
– Dynamic Update
– C# Expressions
– Activity Delegates
– Misc.
• Code! Code!! Code!!!
5. What is a Workflow?
http://bit.ly/mNv50R
http://bit.ly/l3ghxT
6. What is a Workflow?
• A sequence of connected steps
• Often an abstraction of real work
• Can usually be depicted in a graphic manner
Step 1
Step 2
Step 3
7. Windows Workflow Foundation
• Microsoft technology released as part of the .NET Framework
– WF 3 as part of .NET 3.0 (2007)
– WF 3.5 as part of .NET 3.5 (2008)
– WF 4 as part of .NET 4.0 (2009)
• WF 4 Update as part of .NET 4.0 Platform Update 1 (2011)
– WF 4.5 as part of .NET 4.5 (2012)
• Provides a way to model software workflows
– API
– Workflow Engine
– Workflow Designer
10. Workflow Identity & Versioning
• Workflows are long-running
• Workflows are dynamic
• What happens when workflows change?
– Major caveat in WF 4.0
– No built-in solution to handle any versioning scenario
– Self made solutions are difficult
• WF 4.5 ships with a built-in way to handle versioning
– WorkflowIdentity
11. Workflow Identity & Versioning
• New workflows are created with a new version
– Older workflows keep using the old versions
– Side-by-side
• Suitable for all hosting scenarios
– Workflow Applications
– Workflow Services
• Self-Host
• Web Applications
13. Contract-First Workflows
• Workflow Services implement WCF service contracts
– In WF 4.0 contracts are defined within the workflow itself
• Receive & Send Activities
– Implemented contracts must match existing service contracts for
compatibility
• WF 4.5 provides a limited ability to implement existing contracts
– Only from WCF Web Applications
• Workaround available
15. Dynamic Update
• Workflow side-by-side versioning operates on new workflow
instances
– Old instances maintain old versions
• Dynamic updates allow us to transform active instances into a
newer version
– Step 1 – Prepare an update map
– Step 2 – Apply update map on required instances
– Step 3 – Load instances with new WF definition
17. C# Expressions
• WF 4 only allowed VB expressions
• WF 4.5 allows both VB and C# expressions
• By default:
– VB projects use VB expressions
– C# projects use C# expressions
• Loading dynamic workflows with expressions from XAML
requires compilation
• The re-hosted designer does not support C# expressions
21. Miscellaneous Improvements
• Activities
– NoPersist Scope
– New Flowchart Capabilities
– State machine workflows
• Designer
– Designer Search
– Auto surround with sequence
– Pan mode
– Multi-select
– Outline view
– Auto-connect and auto-insert in Flowchart and State-Machine
– Designer Annotations
• Design time background validation
• View State in separate location in XAML
22. Summary
• Workflow Foundation (WF) is Microsoft’s implementation of a
workflow solution
• Targets authoring long-running, dynamic, scalable & unified
applications
• WF 4.5 brings many improvements to the table
– Workflow Identity & Versioning
– Contract-First Workflow Service
– Dynamic Update
– C# Expressions
– Activity Delegates
– And more…
23. Resources
• My Blog
– http://stiller.co.il/blog
• Workflow Foundation
– http://msdn.microsoft.com/en-us/vstudio/jj684582.aspx
• What’s new in WF 4.5
– http://msdn.microsoft.com/en-us/library/hh305677.aspx