What’s New in Windows Workflow Foundation (WF) 4.5?

6,240 views
5,975 views

Published on

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.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,240
On SlideShare
0
From Embeds
0
Number of Embeds
2,497
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Ask the crowd what do they think is the contract
  • What’s New in Windows Workflow Foundation (WF) 4.5?

    1. 1. WF 4.5 What’s New in Windows Workflow 4.5?Eran StillerSenior Software Architect,FounderMarch 20, 2013
    2. 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. 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!!!
    4. 4. What is WF?
    5. 5. What is a Workflow? http://bit.ly/mNv50R http://bit.ly/l3ghxT
    6. 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. 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
    8. 8. The Challenge
    9. 9. New in WF 4.5
    10. 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. 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
    12. 12. Workflow Identity & Versioning
    13. 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
    14. 14. Contract-First Workflows
    15. 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
    16. 16. Dynamic Update
    17. 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
    18. 18. C# Expressions
    19. 19. Activity Delegates• In WF 4 designing activities which take Activity Delegates took a lot of code• WF 4.5 has built-in designer support
    20. 20. Activity Delegates
    21. 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. 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. 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
    24. 24. Presenter contact detailsc: +972-54-6160646e: erans@codevalue.netb: stiller.co.il/blogw: www.codevalue.net

    ×