Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction To Windows Workflow Foundation 4.0

4,906 views

Published on

Session conducted in .NET user group

Published in: Technology
  • Be the first to comment

Introduction To Windows Workflow Foundation 4.0

  1. 1. WHY WORKFLOWS ?• Programming model • Enabling workflow within line-of-business applications • User-interface page flows • Document-centric workflows • Human workflows • Composite workflows for service-oriented applications • Business rule-driven workflows • Workflows for systems management
  2. 2. WHAT IS WORKFLOW ?• A workflow is a set of elemental units • called activities• Activities describes a real-world process• Activity Stores Data using • Variable • Argument • Expression• Describing the order of execution and dependent relationship• Work passes through the model from start to finish
  3. 3. WORKFLOW MODELS Sequential Activity Workflow  start To end  No Go back  One after the other State machine Activity Workflow  Only States  Transitions  when true
  4. 4. ACTIVITY OVERVIEW• Developed as a CLR type • Activity • An abstract base class used to create composite activities • Code Activity • An abstract class for creating a custom activity with imperative behavior defined with the Execute method • Async Code Activity • Abstract Class that manages asynchronous code activity execution from start to completion • Native Activity • An Abstract base class for custom activities that implement execution logic using the Execute method, which has full access to the runtime’s features.
  5. 5. ACTIVITY LIFE CYCLE• Activity Context • Classes that represent the execution environment of an activity• Starts with Executing • Closed • The activity has completed its work and exited • Canceled • The activity has gracefully abandoned its work and exited. Work is not explicitly rolled back when this state is entered • Faulted • The activity has encountered an error and has exited without completing its work
  6. 6. WORK FLOW RUNTIME• is the environment in which workflows execute• Few methods of executing • WorkflowInvoker • which invokes the workflow like a method. • WorkflowApplication • explicit control over the execution of a single workflow instance. • WorkflowServiceHost • message-based interactions in multi-instance scenarios.
  7. 7. WORKFLOW EXECUTIONInvoker MethodWorkflowApplication • Events • Completed • Aborted • Idle
  8. 8. PASSING PARAMETERS - INProperty MethodIDictionary Method
  9. 9. PASSING PARAMETERS - OUTUsing Application Using Invoker
  10. 10. CUSTOM ACTIVITIES• Set of Reusable Activities• Apply Same Workflow Rules• Can have design interface• Can have validation • Override Metadata Cache

×