Awarious OfficePortal - HRMS Application

Where and why should I use Windows workflow foundation?

+1 vote
asked Jul 4, 2013 in Workflow Foundation by anonymous

I am trying to learn Windows workflow foundation. Not even clear so far that why should I use WWF and what is the purpose of this? I do not even see any clear examples for how to write simple example in WWF in the internet. Could someone throw some light on this? What would be the benefit if I use workflow foundation?


2 Answers

+1 vote
answered Jul 4, 2013 by Aadhira (1,215 points)
selected Jul 5, 2013 by administrator
Best answer

What is WWF?

Workflow foundation is a new framework that came with .net 3.0. Microsoft released major frameworks in this release like Windows Presentation Foundation (New framework for writing windows application), Windows Communication Foundation (Very advanced framework for writing web services to make communication between systems in the internet, intranet.)

Using this new framework we can write reactive programming in a better way by writing declarative code. That means,

1. We can write the functionalities that does not need to be executed write after it is loading into the runtime, instead we can schedule when we want to execute that code.

2. Reactive programming is nothing but the execution of the application will be expecting external input. For example, if your application runs through different number of steps, and some step may need some input data that suppose to come from outside environment or some external entities. Those external entities may be human or it may be some other system. So, based on that resource availability, the input may not come at the expected time. But to move ahead on the application process, the outside entities input are must. So, we may need to wait for that input. If you are not using the Worflow foundation, you may be unnecessarily wasting the resource on the memory until you receive the input. But by using the windows worklflow foundation, you can solve this issue.

Why WWF? and Benefits

  1. Since workflow foundation is always scheduled execution, if your application is having workflow process and you want to have better control on the flow execution, then workflow foundation will be better choice.
  2. All your workflow logic will be placed into single location instead of writing them in all different places like .net code layers, stored procedures, views etc.
  3. You can see your application logic in visual diagram which provides the self documentations. So, if any new employee joins your company, they can easily understand the business process flow and they can contribute on the productivity sooner.

Where should I use WWF?

Workflow foundation can be used to write application that needs Sequential workflow process. This can be written using “Sequential workflow”

For example, if you have an application to raise software request, then it has sequence of steps where the execution may move only in the forward direction. Never come back in the backward direction. It may have following sequence of steps

  1.  Software Request will be raised and sent for Managers approval
  2. Manager needs to approve and send to Senior Manger Approval
  3. Senior Manager needs to approve and send it to security team
  4. Security team may needs to approve and send it to Admin team.
  5. Admin team needs to process and provide access for the software and send an email notification to the employee.
  6. In the mean time, employee should be able to see the current status of the request.

Workflow foundation can be used to right State based process execution. This can be written using “State machine” workflow

Best example for this state based execution is defect tracker (Bug tracker) where , you may create a ticked which will be in “New” status, then it will be assigned to developer in “Open” status. Then the developer fix the issue and assign in to tested for testing in “SystemTest” status. Now the tester may able to closed the ticket if the fix worked, otherwise tester may send the defect back to the developer in “Reopen” status.

Workflow foundation can be used for Wizard based application. Since the wizard needs to know what the next step is, what is the previous step and if it has to find the next based on the used input, so wwf would be better choice


If you want to understand how the Windows Workflow Architecture works, please take a look at the below links

0 votes
answered Mar 14, 2016 by annoyedatyouranswer

I'm waiting for the glorious day when people will substitute trying to sound intelligent with a simplistic and comprehensive answer.

Your answer


Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
site design / logo / content © 2013 - 2019