January 2006 - Posts

Windows Workflow Foundation - January CTP Release

Checkout the lastest CTP(January) for Windows Workflow Foundation for developing and running workflows!

Windows Workflow Foundation – Intro To Workflow Style Part III

Now that we have a basic concept of workflows, let’s look at how they are modeled within WF. WF is a new framework that will be bundled within the future release of WinFX. WinFX consists of

 

  1. Windows Presentation Foundation
  2. Windows Communication Foundation
  3. Windows Workflow Foundation.

 

I mention that WF is a framework for two reasons. First, WF is not a server or application. The WF Runtime manages a workflows lifecycle which is hosted within applications like Web, Windows, Console, etc., supporting long-running workflows using persistence, transactions, tracking. Second, because WF is a true framework that can be extended. WF also has three different styles for workflows.

 

  1. State Machine - Minimum of two states where one state is active
  2. Sequential – Predefined and/or predictable flow of activities
  3. Rules-Driven – Data Driven flow of activities

 

Using these styles, WF can model both Human and System type of workflows. Human workflows are a more flexible and reactive within their environment, where system workflows follow a more structured or formal flow. By using the above styles, you can see how Human workflow could be modeled more from State Management style because of the flexibility within the style, where with System workflows, Sequential style is more appropriate because the particular process is solidified. Even though these are the obvious differences, these styles can be interwoven. State Machine styled workflows could have a Sequential styled sub-workflow. For example, when a workflow (a,b,C,d,e) gets to state C, a Sequential styled workflow could be ran to process some data. Finally, Rules-Driven styled workflows are driven, based on set rules for each activity. Let’s say a workflow is measuring an amount and that it has three activities (ABC). The amount is $10 going into activity “A”. Now Activity “B” states, “Bypass me and go to C if amount is less then or equal to $10”.

 

In conclusion to model workflows based on these styles, three questions should be asked.

 

Does the flow of a workflow depend on…

 

  1. Data-driven rules?
  2. Outside Input?
  3. Being Predefined and/or Predictable

Windows Workflow Foundation - What is a Workflow? Part II

When someone says that they are new to workflow, I understand that they may not have any experience with developing workflows. Maybe that person was not aware when they had followed some predefined workflow first or second hand, but participating in some sort of workflow is impossible to avoid. Anytime logical steps are taken to process information or documents, a workflow is being followed.

Some everyday workflows could be.

1. Buying a house or car
2. Product support calls
3. Ordering products online
4. Processing taxes at the end of the year

These examples above have some process for completing each action. To by a house, data must be processed for

1. Approval of loan
2. Getting the house appraised
3. Filling out contracts
4. Establishing insurance
5. Registering real-estate

A product purchased online has

1. Purchasing request created
2. Processed payment
3. Search inventory to find physical product
4. Product is prepared for shipping
5. Shipping maybe monitored

A workflow is made up of a logical flow of activities. An activity is a unit of execution that performs some task, and each activity is considered to be the building block of the workflow. For example, the workflow for purchasing an online product has an activity for searching for a physical product within the inventory to be shipped. This activity could also be used within other workflows within the company too. Maybe the company is thinking about building an Inventory Workflow. This workflow checks inventory, notifies management of low orders and/or creates an order to be approved. It also may submit to the supplier the reorder. The Purchasing Workflow activity that is used to search inventory, could also be reused in the Inventory Workflow, for monitoring product supply. Reuse of activities demonstrates the power of workflows.

Windows Workflow Foundation - A New Chapter, Part I

   It seems that my projects from last year and most of this year are focused around some type of workflow structure.  Last year I built an application that interfaced to Project Server. Project Server did not have a custom process for tracking a projects flow, so I was tasked with creating a particular flow for project tracking. I decided to take it a step further. Not only did I want to separate my workflow logic, I also wanted it to be dynamic and able to accommodate other possible workflows. After I built the engine, I realized the power and importance of workflow when the client wanted changes to the initial workflow they had created. Since my engine was separate, I could make changes on the fly with minimal code changes which meant most of the time without recompiling. It was at this point I decided to focus on building applications utilizing workflow methodology. This year we are building a workflow application that will be tied in to Sharepoint. Although the workflow mechanics should not be to difficult, I was hoping to utilize WWF, however the RTM is still to far down the road for our deployment of the solution. I first saw Windows Workflow Foundation technology when it was unveiled, last September at the PDC. I realized the power, and now I have decided to concentrate on helping others leverage the framework. 
   Most applications that are designed follow some type of workflow. We might not think of them as workflows, because we usually relate workflows to human processes and/or data that is being processed over a given amount of time. For example, hiring a new employee(interview, benefits, getting resources ordered like computer, setting up email) or like my Project Server app above that tracks projects (projects are setup to follow certain stages and must have required data for each phase). These examples follow a certain flow, however a simple application that might not be considered workflow, follow a certain flow as well. For example, a simple app that reads in data in, verifies the data is correct, maybe even makes corrections to the data, and then commits the data to the database. The point to remember is, workflow processing can be instantaneous and/or be processed over time, Human and/or System processes.

 

WF-Attribute 'Class' not found on the root activity

   There is a bug when adding breakpoints within workflows,using the WF Runtime engine, Beta 1.2 that Paul Andew is saying will be fixed in Beta 2.0 Check out this forum. On a side note make sure that you are using VPC  differencing disk images when building your WF environment, because there are some gotchas when installing WinFX Runtime 3.0 Beta 1.2 over the previous beta 1.1. If not, you might be wasting your time with installs.