Archive for October, 2005

Which Workflow Style should I use?: More approaches…

People are asking around which style of workflow should they use for their scenarios and its important to know which workflow type fits best with which scenario, but that’s just the first step!!! Once you get there, there is a whole and exciting world in which open-minded developers started playing a few months ago, a “building blocks game": Windows Workflow Foundation.
This game comes with certain ways of playing it (workflow styles), some rules (you are attached to a certain technology), a booklet (documentation) and of course the building block themselves (toolbox Activities), etc….
Since this game is a building one, it comes with the tools you need to build, and the booklet shows you the best ways of building some sample constructions. This is useful because you get to know which approach you must take in order to build your own construction.
Going back to our real game, there are some questions you can ask yourself in order to know which workflow style is more suitable for your application:

WhichStyleOfWFWhen

That is how some order approval workflow (where users are in control of the sequence) fits better with a State Machine type and a vendor machine workflow (the machine makes the decisions based on inputted data) fits best with a sequential style… You can find similar ideas in a Dave Green´s great post.
One important thing are some approaches that go hand by hand with each workflow type. And that´s another way of noticing which type of workflow you must use. Because if you have a sequential workflow full of event driven activities, you will solve your problem in a much better way using a state machine style, for example.
Another important approach mentioned in Dave´s post is the Data Driven, which is typically solved by a list of activities executed on a variety of conditions. This approach is implemented by the "Constrained Activity Group" and the "Policy" models, typically found in sequential workflows.
However, as I said before, this is just the beginning…because maybe (you will probably agree with me on this…) you need to combine both of these approaches to solve your scenario. This leads us to custom workflows, which are not another thing than custom activities!!!
Then, one after another, you will find yourself thinking about other aspects of Windows Workflow Foundations that you must implement and in many cases extend.
Some of those could be communication by local connection, communication by web services, workflow persistence services, etc…

As a conclusion we can say that its fundamental to know which workflow style you should use for which scenario. But its even more important to understand that you will probably have to make use of the tools that the game of windows Workflow Foundation gives you to make your own Workflows (in a practical way you can see a workflow as an activity) and arrange the context (host, communications, persistence, etc) to serve the solution…… But the best way of getting to understand this is, like a game, by playing with it!!!
PS: some extending explanations on related stuff comes tomorrow…stay tuned!

ASP.net + WWF Example: Navigation Map with Local Connection approach.

This example intends to show a way of implementing some kind of a navigation map for websites based on workflow.
Because
of the navigation nature of web sites (the user navigates through nodes
without a specific order), the chosen workflow is a state machine type.

For this simple example, we use just two nodes represented by web pages. In the first one (Create step represented by Default.aspx page), the user enters some data that is stored inside the workflow and then retrieved in the second step of it (Show step represented by Show.aspx page):

Drawing1

We are investigating many ways ASP.net and WWF interact so stay tuned for more approaches!!!
Download:
ASPNET_NavigationWorkflow.zip
Related URL: James conard´s ASP.NET WebForm Example

Build Workflows outside of the VS2005

An interesting idea that has been getting attention in the past days is the possibility of building workflows outside of the VS Workflow Designer.
The most relevant developed examples of this new possibility are: