views:

411

answers:

2

I'm building a web application which has some processing of user requests involved. A user submits request for something, it goes through few steps and channels and its status changes through some predefined statuses, in the organization before being approved or rejected. During processing the ball may roll back to the user's court for some changes or to update some information.

The client wants to user workflow to control the processing. Please let help me decide how I can integrate it with the application. Should I start new workflow instance whenever a new request comes, return the next state and possible actions that processing person can take and close the workflow?

Or some other approach will be better?

A: 

You could maybe look at the Web Workflow examples?

Marc Gravell
+1  A: 

You definitely want to start a new workflow instance for every user request. It is this workflow that controls the life of your users requests.

Have a look at K. Scott Allen's Orders Workflow on Ode To Code for a full working example of a website that handles "orders" through a state machine workflow. The workflow code is nicely separated from the web layer.

iamdudley
Yes @imadudley I've already studied Scott's and other samples and done my job!
TheVillageIdiot