Geeks With Blogs
Paul Chapman .Net Musings

One of my current clients has a need for a workflow and document management system to manage applications. This has prompted me to look at Windows Workflow Foundation to manage this application process.

The workflow has a number of advantages over writing the whole thing from scratch;

  • Most businesses have processes; be that purchasing, selling, staff applications. Once a process has been determined the workflow can be designed graphically - and this graphical design drives the code generation, meaning the process is always going to be closer to the users requirements.
  • The workflow system manages the running of the process, rules can be defined and this process will always be the same
  • In addition to controlling and managing a workflow, a workflow process can be tracked - it is possible to find out exactly where a workflow is, but also the stages it went through before.

Because most of our workflows involve humans who do not always want to do the stages when the computer does; the workflow must therefore wait. Easiest way of doing this is to use a State Machine Workflow; which moves from state to state as each stage is done.

In order for the workflow to work however we need to define the parameters that will drive it. So what we do first is define a class that inherits from ExternalDataEventArgs. and then define an interface with each of our events defined within it. Once we have done that we can then use a tool called 'Windows Communications Activities Generator to generate the classes that will define our communications.

When could run the wca tool from within Visual Studio in which case it will pick up it's parameters from the solution currently loaded. We set this up by using the Tools, External tools option of the Visual Studio IDE. Clicking on the 'Add' button allows you to add another tool to the menu.

My settings for the Windows Communications Activities are as follows;

Title: Workflow Communications Activities
Command:  C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\WCA.exe
Arguments: $(TargetName)$(TargetExt) /o:$(ProjectDir) /l:vb
Intial directory: $(TargetDir)

I've also checked 'Use Output window' - so I can see the wca tools output but have left 'Prompt for arguments' and Treat output as Unicode' clear.

 

Posted on Wednesday, July 2, 2008 11:08 PM Windows Workflow Foundation | Back to top


Comments on this post: A first attempt with Windows Workflow Foundation #1

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © paulschapman | Powered by: GeeksWithBlogs.net