Windows Workflow Foundation (RSS)

Modifying Workflows At Runtime

Jax Code Camp came and went but not without getting a group of people excited about WF. I received some positive feedback by breaking up my WF sessions to "Intro" and "More Advanced" WF topics. One major topic that everybody was interested in discussing was modifying workflows during runtime. I think there was some confusion so I wanted to post more information about modifying workflows. Well not really the workflow but workflow instances.

  1. Modifying WF instances can be done when the workflow is either
    • Suspended
    • Idle
  2. WF instances can be modified either
    • The Instance it's self
    • WF Host
  3. WF instances that are modified are the ONLY instances affected with the changes.

BPM and SOA

I found an interesting article that talks about the relationship of BPM and SOA. Reading this article you start to get a clearer picture as to why Microsoft's Connected Framework Team has already started combining the two with WCF and WF.

This Saturday, at code camp one of my sessions, "What to know about WF" will venture into this topic. Register now if you are in the area!

Jacksonville Code Camp Call For Speakers

The Jacksonville Code Camp has just opened it's invitation for speakers. It will be held Saturday, August 25th, 2007 so if you have a technology that you're excited about and you want to share with others come join us. If you have never spoken before and want to give it a try...no worries, this is where you can learn the skills for being a good speaker.

This code camp is particularly special to me since it is hosted in my hometown of Jacksonville, Fl. Last year we had a pretty good turn out, and this year we plan to make it even better so if you are in the area, please plan on attending and learning about Microsoft technology. I just submitted two WF sessions that have some great demos I crafted that show how to get started using WF, and some that show off some of the really cool features of WF, including WF in MOSS.

What WF Can Do For You

Here is a 'to-the-point' article that explains what WF adds to development. To the point and small enough to win any manager over to WF!

Pro WF: Windows Workflow In .Net

I want to share some insight about to a new book that I have been reading for the past month now that has helped me tremendously with WF topics that I felt I needed some clarification on. Bruce Bukovics’, Pro WF: Windows Workflow In .Net 3.0 book has everything you need to get up to speed on WF. This book has 684 pages of interesting knowledge on WF. It also has complete code included so there are no misunderstandings as to the direction of the topic! You might even get out of your recliner after reading a couple of pages and feel like Neo, wanting to use Kung fu!

Load WF State Transitions For The WF Host

When working with state machine workflows there is a need to notify the WF Host, of possible transitions or events that can be rendered, based on the current state of the workflow. This way the host can react to the workflow’s state rather than having to embed separate responsive logic within the host application. This can easily be accomplished by using the StateMachineWorkflowInstance object.

Consider a windows state machine workflow host that controls the flow of the workflow by firing events from different buttons on the form. Each button has an ID of an activity's ID represented within workflow. So now that each button represents the states of the workflow, let’s take a closer look and analyze the code below.

In the following method, UpdatePossibleStateTransitions, the System.Workflow.Activities.StateMachineWorkflowInstance is instantiated by passing in the running WorkflowRuntime and the running WorkflowInstanceId for the workflow instance that I am interested in retrieving possible transitions. The read-only generic collection, System.Collections.ObjectModel.ReadOnlyCollection is the object type that is set with current Workflow State’s possible state transitions, from the StateMachineInstance.PossibleStateTransitions object.

private void UpdatePossibleStateTransitions()
{
     Button cmd;
     StateMachineWorkflowInstance StateMachineInstance =
          new StateMachineWorkflowInstance(_wfRuntime, _wfInstance.InstanceId);
 
     System.Collections.ObjectModel.ReadOnlyCollectionstring> PossibleStates
          = StateMachineInstance.PossibleStateTransitions;
 
 
     foreach (Control cntrl in this.Controls)
     {
          if (cntrl is Button)
          {
              cmd = (Button)cntrl;
              if(cmd.Name!=cmdStopRuntime.Name)
                    cmd.Enabled = false;
 
              foreach (string PossibleState in PossibleStates)
              {
                  if (PossibleState == cmd.Name.Substring(3, cmd.Name.Length-3))
                      cmd.Enabled = true;
              }
          }
     }
}

Now that the possible state transitions are loaded based on the current state of the workflow, the code loops through the controls on the form and finds only the controls that are Type Button. First all the buttons on the form are disabled except the one that actually stops the workflow runtime, and then the possible state activities are looped through matching buttons that have the same name as the iterated activity name, and then enabling those buttons that can be transition to as next possible transition(s).

There are two critical opportunities for getting possible state transitions. When a workflow instance is loaded from a persisted state and while the workflow instance is running. The above code can be called after a workflow instance is loaded, however if the workflow is never persisted, events need to be fired from the workflow to make the host aware that the state has changed.

Retrieving Peristed Data Sent to Workflows

There are two ways to communicate information with a workflow through its hosted runtime. First, data can be sent to the workflow via parameters. When a workflow starts up and runs it can process that data sent to it, however during the workflow’s lifecycle, the initial data sent to the workflow can change. With short-running workflows where the workflow host continues to run while the workflow finishes, the workflow throws a “workflow completed” event and passes the processed data to the host.

The second way to pass data to a workflow is through events, and if the workflow is again short-running, then you could use CallExternalMethod Activities to raise local service events to the hosted runtime to pass back processed data. But what if the workflow is long-running? What happens if multiple applications need to re-hydrate the workflow for processing? Is data sent to the workflow via events persisted too? Sure it is… and it is very easy to retrieve.

So let’s already assume that you have need for a long running workflow that will be persisted by default when it becomes idle. You have also created a local service with events and added it to the host to communicate with workflows, by passing “args” to it. Make sure that Parameters “e” property (found in the property window) for each HandleExternalEvent activity that implements an event from the local service is set to a local workflow variable of its type. Next, when the “SQLWorkflowPersistenceService” service is added to the runtime, it should have a reasonable lock-time on each persisted instance (about 5 minutes or more), and call, “StopRuntime()” to STOP the runtime rather than just killing the runtime host during debugging, to avoid situations when trying to unload workflows that the runtime still thinks are in memory. There is a workflow method that is called each time that it loads called, “OnActivityExecutionContextLoad”, and a property called, “UserData” that all activities derive from that objects can be added.

The following code verifies if the eventargs, local property in the workflow has been set. If so, it adds the property to a collection and gives the item a distinct key. In this case, it makes more since to make the key the same as the instanceID of workflow instance.

private Movie.RentalArgs _rental; //Property set by HandleExternalEvent activities
 
public Movie.RentalArgs Rental
{
     get { return _rental; }
     set { _rental = value; }
}
 
protected override void OnActivityExecutionContextLoad(IServiceProvider provider)
{
     if (_rental != null)
        this.UserData.Add(_rental.InstanceId, _rental);
}

Finally, the workflow host should check to see if there are any persisted workflow instances. When a persisted instance is identified, the following code shows how to get the workflow definition, to get to the “UserData” property that was set when the workflow loaded.

private void LoadPersistedWorkflows()
{
    Activity Act;
    IEnumerable PersistedInstances = null;
 
    PersistedInstances = _persistanceService.GetAllWorkflows();
 
    foreach (SqlPersistenceWorkflowInstanceDescription Instnc in PersistedInstances)
    {
        _wfInstance = _wfRuntime.GetWorkflow(Instnc.WorkflowInstanceId);
        Act = wfInstance.GetWorkflowDefinition();
        _rental = Act.UserData[_wfInstance.InstanceId] as Movie.RentalArgs;
    }
}

Retrieval of data that is initially sent to workflows can be important. Expecially if that data could change over the lifecycle of the workflow. In some cases, it may be appropriate to store this data outside of the workflow, however you still may need to populate screens with data from the workflow, based on the state of workflow.

Persisting Workflows Using WF- Movie Rental Example

Here is an article that shows how to persist running workflows. Persisting long-running workflows is just one of the powerful features of WF, and this article gives a great example. It shows a movie being rented from a store and how the rental metadata is persisted until the movie is due or returned back to the store. The article also shows how to create the Sql data store and how to wire up the core service for handling persistance. Get the solution used for this article here.

Understanding WF Activities

I just got an email from the Orlando's .Net user group, that this month's Florida codecamp in Orlando just approved my additional session, "Understanding WF Activities"! The session will explore the majority of the activities that comes with WF. The sessions also got boosted up to an hour so I might be able to hit on how to build custom activities too! If you are in the area, March 24, 2007, come check it out. Register Here

Finding Possible State Events

If you look in the latest Framework 3.0 SDK, there is an example called 'OrderingStateMachine'. It does a great job of showing how to get possible state events within a current state, by loading a ReadOnlyCollection, type 'WorkflowQueueInfo' with Queued Data and then looping through the collection to pull out the queued method names.

I was talking with Jon Flanders, and we got on this subject awhile back about looping through the actual activity collections, and therefore I wanted to post how to do that to also get possible state events from a current state. Although looping through the activity collection takes some extra work, there is additional information available via the activities properties by doing this.

Learn About WF At Jacksonville's Code Camp, August 26, 2006

Jacksonville's Code Camp is finally here! Being a native of Jacksonville, I must say that this one is my favorite code camp of the year. Instead of having to drive across Florida and stay in cheap hotels, I get to wake up in my own bed and drive just a few miles to the event. During this code camp I promoting WF by giving two sessions, Getting To Know Windows Workflow and Building Custom Workflow Activities. If you happen to be in the area and you are are a geek like me, give up your Saturday by registering for this FREE event and geeking out!

Recursive Composition

The Tampa Code Camp last weekend was fun, however I had many questions concerning Recursive Composition from the second session I did on human workflows. Here is the low down...

Sometimes multiple states need to use the same event. If you look at the model used in my previous blog, there are two states, "WashingBay" and "WorkOnAutomobile". These states need the same event to process payment once either them has been completed. Instead of adding a "ProcessPayment" event to each state, it makes more sense to allow each state the ability to inherit the event from a parent state. This is a two step process.

1. Add a new state to the machine state workflow, and give it a name that generalizes what child events it may contain.

2. Add an event to the new state that needs to be inherited from other states.

At this point, any states that need to inherit the event from the state can simply be dragged and dropped within the parent state. Once this is done correctly, each state will be readily seen as children of the parent event. Once each child state is active, they will able to inherit the event from the parent state.

Skip And Rework Pattern

I recently took my jeep to get the oil changed. While I was there, I realized that garage's business process model would serve as a great demonstration of "how" and "why" to implement a Skip/Rework Pattern for a State Machine workflow, at tomorrow's code camp in Tampa.

Here is the model... Oil Change

While I was giving the clerk my contact and payment information, they asked me if I would approve any needed work that they felt the jeep needed up to a certain amount. Obviously they would let me know before performing any additional service(s). If I did not approve needed work up to a specific amount, they would have to spend more time explaining what needed to be done and if they were to busy possibly removing my car from the bay to service another waiting customer. I would then have wait or make another appointment for a later time.

The Skip and Rework pattern is demonstrated by skipping the normal flow for the RecommendingAdditionalServices event, and getting the customer to approve or deny the additional service(s) within the ServiceApproval state.  Instead, needed services can be done immediately by setting the active state to WorkOnAutomobile, directly from the ChangeOil state.

The code do set the state active is pretty simple. I found the above code in Paul Andrew's book, and modified it to fit. The code above is wired to a button that allows the manager to bypass getting approval and sends the car directly to get service(s), because the customer already gave approval up to a certain estimate.

I first check that the Customer has given approval. Then I declare the SetStateEventArgs and pass the state I would like to set as the active state. The event to set the state is raised by calling the EnqueueItem for the workflow instance, passing the arguments for the state that needs to be set.

Learn About WF July 15th, In Tampa, Florida

The next Florida Code Camp is just around the corner! This month's "Geek Fest" takes us to Tampa, Florida where geeks of all ages get to learn about the latest and greatest technologies. With the new .Net Framework 3.0 CTP just released, this event could not have been scheduled at a better time. I will be giving two sessions focused on WF... One session will explain what Windows Workflow Foundation is all about, while pointing out key features of WF and how workflow styled applications can benefit from utilizing the framework. My second session will be focused on Human Workflows, the role they play in today's business processes and how they are built using WF. If you are in or will be in the Tampa area, make sure you do not miss this free event. To register, click here!

Notifying the Runtime Host Of A Workflow's Current State

Not sure how to get your UI host to reflect the current state of a persisted workflow? I found a way to get your tracking service to send this information to the hosted runtime from the workflow. Tracking services can track information like previous, current and next state for workflows. When a workflow is hydrated, the hosted runtime needs information about the current state to update the UI, so it makes sense to send state information about the workflow to the hosted runtime using a tracking service.

Host

  1. Build a tracking service for the workflow. There is a great example of this in the Hands On Lab's.
  2. Add the Tracking Service to the workflow runtime using the AddService() method
  3. To see that the tracking service returns the current state, add the following code

        void m_wfRuntime_WorkflowLoaded(object sender, WorkflowEventArgs e)
        {
            RentalCore.RentalTrackingService TrackSvc = (RentalCore.RentalTrackingService)m_wfRuntime.GetService(typeof(RentalCore.RentalTrackingService));
            MessageBox.Show(TrackSvc.CurrentActivity);
        }

Workflow

  1. Open up the workflow(.xoml) and override the following method

        protected override void OnActivityExecutionContextLoad(IServiceProvider provider)
        {
             RentalCore.RentalTrackingService TrackSvc = (RentalCore.RentalTrackingService)provider.GetService(typeof(RentalCore.RentalTrackingService));
             TrackSvc.CurrentActivity = base.CurrentStateName;
        }

    The code above grabs the tracking service from the workflow and sets a custom tracking service property, "CurrentActivity" to the workflow's "CurrentStateName". When the workflow is hydrated this method will run. When you run your solution, there should be a pop up demonstrating that the CurrentStateName is returned to the runtime host from the workflow.

 

 

 

Another Successful Code Camp

The Tallahassee User Group and Joe Healy did a great job putting together the Tallahassee Code Camp, this past weekend. These code camps are always fun, and I expecially had a great time explaining and showing off WF at my sessions. I also received some positive feedback from many that attended my sessions who plan to start messing around with the framework now that they have some insight! This was very rewarding to hear, since I had some trouble with one of my VPC images, during my last session. The crowd was very understanding, and instead, I turned my last session into a "chalk talk". I will webcast the demos that I did not get a chance to show, and I will make sure to put them up for viewing.

On a sad note,  my family and I returned home from Code Camp today, to find that our cat, "Solley" had passed away... "We miss you buddy!"

Free Intro To WF and State Machine Workflow Sessions

This Saturday, I will be spending my time at the Tallahassee Code Camp, sharing and demonstrating the power of Windows Workflow Foundation. My first session, "Intro To Workflow Foundation" will be a primer to familiarize the importance of WF with demos showing off powerful capabilities like how to communicate, build custom hosts and persist idle workflows. My second session, "People vs. Machine" is all dedicated to building and tracking State Machine styled workflows.

I cannot think of a better way to spend a Saturday... Of course, I could be hanging at the beach checking out the scene, but with a free all day geek fest event, why? WF is going to revolutionize business process development, so what could be more important then learning how? Come check out this free event if you are in the FSU area!

WF Tracking

Have you spent anytime with Windows Workflow's Tracking Services? I just finished spending the past view evenings trying to get up to speed for Tally's Code Camp, on July 17, 2006. I am sure there are going to be some questions about tracking, and luckily I found Moustafa Khalil Ahmed's blog which really helped me out. I wanted to share some info about tracking within areas that I struggled with and that were not to obvious.

TRACKING BACKGROUND:

Tracking is handled through the System.Workflow.Runtime.WorkflowRuntime. Custom services that inherit from System.WorkflowRuntime.Tracking.TrackingService are added to the hosting runtime just like any other service by using the runtime's AddService method.

Tracking Profiles can be customized to return what information is needed to be tracked.

  • Workflow Events
  • Activity Events
  • User Events

CUSTOM TRACKING SERVICES

To Building custom tracking services requires two things...

  • A custom Tracking Service object that inherits from the abstract class TrackingService
    • This is the service that is added to the workflow runtime
  • A Tracking Channel object that inherits from the abstract class TrackingChannel.
    •  Used to channel the tracked information back

BUILDING THE CUSTOM SERVICE

Override the TryReloadProfile function of the TrackingService object.

  • This function will be called by the runtime when changes are made.
  • This is also where code needs to be written for building a custom profile.

Override the GetTrackingChannel method of the TrackingService object.

  • This method is what passes the TrackingParameters to the TrackingChannel object

BUILDING THE TRACKING CHANNEL

Now for the TrackingChannel Object...

Override it's Send method

  • This is the method that passes the TrackRecord
    • The TrackRecord is built by the custom profile and holds the information about the workflow

Once the custom TrackingService is working, it can be customized even more to return exact information needed by the workflow host. Bottom line, tracking worklows is a must and should be considered part of building a workflow.

Happy Tracking!

Windows Workflow Foundation Beta 2.2 And WinFX 2.0

Want to play with both WinFX and WF together? Get the latest WinFX that was released on 5/23/2006 which bundles the latest runtime for Windows Workflow Fundation beta 2.2... Click here to download.

Make sure you get the Extensions Beta 2.2 as well!

WF Components and Extensions Beta 2.2 Released

The WF team has released Beta 2.2, the latest Runtime & Extensions for WF. Click here to download!

HandleExternalEvent Activity Requirements

While preparing for my next speaking engagement on WF, I came across an issue that cot me many many hours of time. I am not sure if it was because I took an unfortunate break from WF while training clients on ASP.Net 2.0, or if I still would have ran into the issue anyway. My problem was that my HandleExternalEvent Activity was not receiving the event when fired from my service. So I pulled up another example that I have used in many of my previous sessions and studied the differences of how I had wired it. I even thought that I had found a bug that I could report back since WF is beta, but the bug was mine! So instead of you having to deal with the same issue, I decided to share it and also list the requirements for using the activity.

  1. Must have an Interface to use as a contract with the HandleExternalEvent Activity
    • ExternalDataExchange attribute must be set for the Interface...ex. [ExternalDataExchange]
  2. When using custom EventArgs, make sure that they inherit from ExternalDataEventArgs and that the object is Serializable... ex. [Serializable] public class RentalArgs : ExternalDataEventArgs
    • HERE WAS MY PROBLEM...if one of your members returns another custom object, MAKE SURE THAT OBJECT IS SERIALIZABLE TOO...[Serializable]
    • Your custom args object will have an instanceId base property from inheriting from ExternalDataEventArgs, that should be set by the InstanceId of the workflow that is running
  3. Finally, make sure the service you build to implements the interface.

Want to learn more about WF or you can't afford TechEd! Come to Tampa TechEd Outcasts, June 12-16

Delay and Listen Activty For WF

There have been some questions about the article I wrote for MSBICentral that demonstrates how to use the HandleExternalEvent, IfElse and CallExternalMethod Activities. My article has the workflow managing the decision to hire someone based on a condition and without human intervention(i.e managers approval). I decided to create another example that shows how to wire up a Listen Activity if a managers approval was required. I have uploaded the example to MSBICentral called "Delay and Listen Activity Example", and it can be found in the Downloads Section, "Workflow Foundation Examples". I have a couple of speaking events I am trying to prepare for, and when I get some free time I will upload another example on MSBICentral that shows a basic manager approval workflow.

Note: MSBICentral requires a free user account to view its content, but hey...SQLServerCentral does too:)

Extensions for Windows Workflow Foundation Beta 2.2 Available

There is a new WF Extensions beta that has been made available for download here. The new extensions fix the following issues noted from the above link.

  • Showing of interface types that are nested while trying to select interfaces
  • Being able to select overloaded methods within the "CallExternalMethodActivity"
  • Showing of interface types that are nested while trying to select interfaces.
  • Being able to run more than one workflow within the same VS Project.
  • Error notification when trying to detach the debugger from a process.

Checkout the requirements before trying to install!

WF Activities Part I – Practical Use of HandleExternalEvent, IfElse And CallExternalMethod Activities

I have loaded a new article/lab out on MSBICentral demonstrates how to use out of the box activities that come with WF. I start by showing you how to build a workflow that will handle an interviewing process. The process is somewhat simplified because the person is only hired if they live in a certain zip code range, however the example does a good job of showing how to wire up each of the activities discussed to make the selection. To do this as a lab you will need the following solution files, WFActivities Part I Host Example and WF Activities Part I Interview Bus Obj

Windows Workflow Foundation - Why WF?

There are four major short-comings of developing workflow applications that WF helps simplify within it's framework...

  1. Ability for the workflows to maintain state for extended periods of time.
  2. Implementing dynamic flow that model human behavior with workflows.
  3. Generating Workflows thru XML & Updating/extending workflows at runtime.
  4. Adding transparency to workflows while workflows are developed and ran.

 WF has a hosting layer that connects the host application running the WF Runtime with the workflow. State for a workflow is managed through the host layer service: "Persistence". Instead of the persistence service provider maintaining state within memory for extended periods of time, the provider knows when a workflow has become idle. Maybe an approval needs to be made and the workflow is waiting for requested data, but instead of holding it's state in memory for the duration, it can persist it's state within a data store whether it be SqlServer or the file system.

 The State-Machine Style for workflows allows the flow of workflows to be more reactive then predefined. Activities need the ability interact through human input. This style of workflow characterizes human behavior where activities within a workflow can become active from any possible activity. Now human behavior workflows are supported using WF and modeled just as efficient as predefined workflows.

 One of the most important features of WF is the ability to create and update workflows at runtime. WF allows workflows to be built using XAML(Extensible Application Markup Language). Workflows can now be dynamically changed by making modifications to its XAML. There is also a namespace, System.Workflow.ComponentModel.WorkflowChanges that allows activities to be manipulated within a workflow during runtime.

 Using WF, developers do not have as deep to see what makes up a workflow. The workflow designer enables drag n drop functionality to construct a workflow quickly. Once a workflow has been created, the code can be stepped through and debugged visually through the designer. There is also a hosting layer called, "Tracking" that allows workflow processing to be traced. The tracking information of a workflow is stored to fit the hosting process.

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.