Introduction to Workflow 4

2,122 views

Published on

An introduction to Workflow 4, the differences with earlier versions and examples

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

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

No notes for slide
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Transactions are necessary when two or more activities must be coordinated as a single operation, ensuring that the system is always left in a consistent state. The only two viable options are to complete all activities successfully or to leave the system as it was before initiating either activity.
  • Introduction to Workflow 4

    1. 1. www.orbitone.com Raas van Gaverestraat 83 B-9000 GENT, Belgium E-mail info@orbitone.com Website www.orbitone.com Tel. +32 9 265 74 20 Fax +32 9 265 74 10 VAT BE 456.457.353 Bank 442-7059001-50 (KBC) 27 August, 2010 WorkFlow 4
    2. 2. 27 August, 2010 WorkFlow 4 Like any technology, applying WF requires understanding what it is, why it's useful, and when it makes sense to use it.
    3. 3. 27 August, 2010 WorkFlow 4 Isn't WorkFlow Foundation just a visual way to write code and thus despicable? What is Windows Workflow Foundation? A framework for declarative programming Tools for creating program definitions A runtime for executing program logic
    4. 4. 27 August, 2010 WorkFlow 4 DESIGNER DEMO But first the simplest possible demo Where we also show that it's possible to add breakpoint ?!
    5. 5. WF 4.0 Data Flow Constructs Arguments Variables Expressions Used to define the way data flows in and out of an activity. Used to declare named storage for data within an activity. Performs simple operations on arguments to return a value. 27 August, 2010 WorkFlow 4
    6. 6. 27 August, 2010 WorkFlow 4 PURE CODE DEMO
    7. 7. WCF Workflow Services WCF Service WF Workflow Client External Service External Service WCF endpoint WCF endpoint 27 August, 2010 WorkFlow 4
    8. 8. 27 August, 2010 WorkFlow 4 Benefits  Long Running Process  Scalability
    9. 9. 27 August, 2010 WorkFlow 4 Composability a workflow can contain flowcharts, state machine, C# code, ... everything is an activity
    10. 10. Challenges  Work is increasingly distributed  Coordination code creates complexity Coordinating messages with application state Coordinating calls to a database or another service (Async I/O) Coordinating rainy day scenarios  Management and tracking of distributed work is difficult 27 August, 2010 WorkFlow 4
    11. 11. WorkflowServiceHost Foo Foo Foo 27 August, 2010 WorkFlow 4
    12. 12. 27 August, 2010 WorkFlow 4 Visual Visual vocabulary to compose solution makes it easier for non developers to create
    13. 13. 27 August, 2010 WorkFlow 4 Tracking
    14. 14. 27 August, 2010 WorkFlow 4 Integration SharePoint 2010 uses WF3? But there is an upcoming book "Professional Workflow 4 in SharePoint 2010: Real World Business Workflow Solutions " http://www.amazon.com/Professional-Workflow-SharePoint- 2010-Solutions/dp/0470617888 TFS2010 uses WF4
    15. 15. 27 August, 2010 WorkFlow 4 Documentation The business analysis can be mapped directly translated to workflow/code There is no distinction between documentation and code IAB Flowchart on the next slide =>
    16. 16. 27 August, 2010 WorkFlow 4
    17. 17. 27 August, 2010 WorkFlow 4 Documentation  Another often used modeling convention is the State Machine
    18. 18. Loading Workflow <Activity x:Class=“Foo" > <x:Members> <x:Property Name="argument1“ Type="InArgument(x:String)" /> <x:Property Name="argument2” Type="InArgument(x:String)" /> </x:Members> Foo.dll C# (DynamicActivity) Activity x = ActivityXamlServices.Load(xamlFile); WorkflowInvoker.Invoke(x, new Dictionary … ); 27 August, 2010 WorkFlow 4
    19. 19. 27 August, 2010 WorkFlow 4 LOAD XAML DEMO show the xml load it
    20. 20. 27 August, 2010 WorkFlow 4 Workflow Service User Model Operator Commands: • Suspend, Resume, Terminate and Cancel Running Active - In Memory Idle – Persisted Suspended Reason: • Exception code • Exception text Completed Suspend Resume • Successful Completion • Terminate • Cancel •Terminate • Cancel
    21. 21. 27 August, 2010 WorkFlow 4 Persistence / Durability Windows Server AppFabric Windows Server AppFabric Load Balancer Persistence DB Workflow Service Workflow Service Workflow Management Service Workflow Management Service Windows Server AppFabric Workflow Service Workflow Management Service Instance 123 | data 456 | data 789 | data 011 | data
    22. 22. 27 August, 2010 WorkFlow 4 Persistence Persistence lets you pause an instance, save it somewhere & resume it later A persisted instance has no affinity to a WF host instance, CLR instance, thread, process, or machine Helps with scalability; helps with recovery from failure WF program instances are serializable A CLR stack is not serializable, but in a WF program a stack only exists transiently, during work item execution Details of persistence are deliberately separate from the machinery of the WF runtime
    23. 23. 27 August, 2010 WorkFlow 4 What’s in a Serialized Instance? A serialized instance contains: Work item list (empty if instance is idle) Bookmarks Data (arg and var values) •Environments for all executing activity instances Activity instance info (callbacks, execution props) Custom data from persistence participants Does not contain the workflow definition A million instances can share the same definition Management of definitions is a host responsibility
    24. 24. Workflow Service = WCF + WF Think "WCF on the outside, WF on the inside“ WCF exposes external interface WF describes internal flow & state transitions 27 August, 2010 WorkFlow 4
    25. 25. 27 August, 2010 WorkFlow 4 Workflow services WCF Workflow Services WCF Service WF Workflow Client External Service External Service WCF endpoint WCF endpoint
    26. 26. 27 August, 2010 WorkFlow 4 Content based correlation
    27. 27. Some Closing topics WorkFlow 4 27 August, 2010
    28. 28. 27 August, 2010 WorkFlow 4 Server AppFabric  Most WCF services are hosted in IIS / WAS  IIS tooling designed for managing web applications  Windows Server AppFabric = service management Simplified configuration of services and workflows Operations dashboard Workflow service management GUI and PowerShell tools
    29. 29. 27 August, 2010 WorkFlow 4 Dashboard
    30. 30. 27 August, 2010 WorkFlow 4 Server AppFabric  Health overview provides information about services Exceptions / completed call count / throttling limits reached Workflow instances (active / suspended) Recent history – activations / failures  Access to workflow information List of persisted workflows Tracked workflow data and events  Tools are based on tool scope (site / application / service)  Custom queries also possible
    31. 31. 27 August, 2010 WorkFlow 4 WF State Machine
    32. 32. 27 August, 2010 WorkFlow 4 PowerShell support  PowerShell is THE modern scripting environment on Windows  Most commands and data available as PowerShell cmdlets  Get and set configuration settings  Enable application messaging  Instance management – resume, suspend, terminate  Combine with other web modules  Web Administration PowerShell module for managing IIS  MSDeploy – synch or deploy local or remote services
    33. 33. 27 August, 2010 WorkFlow 4 hosted designer - MS Research – Trident
    34. 34. www.orbitone.com WorkFlow 4 27 August, 2010

    ×