views:

530

answers:

3

I am implementing a quite simple state-machine order processing application. It is a e-commerce application with a few twists. The users of the application will not be editing workflows by themselves.

Microsoft claims that asp.net and Windows Workflow is possible to combine. How hard is it to install and maintain a combination of asp.net and Windows Workflow? I would be keeping the workflow state in sql-server.

Is it easier for me to roll my own state machine code or is Windows Workflow the right tool for the job?

A: 

If your state machine is very simple, then I would say that you should just roll your own. You have more control over everything. You can deal with persistence on your own terms and not worry about how they do it.

WF does look pretty cool though, but I think that it's power probably lies in the fact that it is easy to tie it into frameworks like CRM and Sharepoint. If you are going to use these in your application, then I would definitely consider using WF.

Full disclosure: I am definitely not a WF expert.

Charles Graham
+1  A: 

It depends on your needs. How complex is the state machine? Where do you want the state machine to live (e.g. model vs. database)? WWF provides an event based state machine, which is good enough if your state machine is embedded in the model.

Personally I've implemented an e-commerce framework and other workflow based websites and I've have always had a lot of joy from implementing database based state machines. Always worked without a hitch.

On the other hand, some colleagues of mine prefer WWF.

In any case it works perfectly with ASP.NET.

Sklivvz
+2  A: 

Asp.net and WF get along just fine, and WF doesn't add much maintenance overhead.

Whether or not this is the right design for you depends a lot on your needs. If you have a lot of event driven actions then WF might be worthwhile, otherwise the overhead of rolling your own tracking would probably add less complexity to the system.

WF is reasonably easy to work with so I'd suggest working up a prototype and experimenting with it.

Also, in my opinion, based on your requirements, I doubt WF would be the right solution for you.

Wedge