Best practices for developing a workflow for an ASP.Net web application?

My team was tasked with developing a workflow-based web application. I need advice on design.

Workflows must be dynamic. Meaning, users can define workflows through some interface and apply these workflows to this scenario (definitions will live in the SQL 2008 database). Scenarios are business driven and will never change. Thus, there can only be 2 types of scenarios for which a workflow can be defined. Workflows are not necessarily linear. Some state will drive the workflow. States will also be dynamic, but exist only in the workflow.

I watched examples of work processes and state machines, and my head is spinning. I'm not sure that I want to use the Workflow Foundation or something that we are developing. I have seen this and I think it might work, but I'm not sure that the full implementation of the staff will work for us.

+2
workflow state-machines workflow-foundation-4
source share
1 answer

You can do this with WF4. I never used Objectflow, so I can’t comment on it, but it seems to be a solution for working with memory and with an ASP.NET website hosted in IIS, which means that you will sometimes play as IIS and AppDomain transitions. This is usually not a big problem, as it does not happen often, but the WF4 InstanceStore will take care of this. It also allows you to run a web farm without sticky sessions and transfer workflow from machine to machine.

Another nice thing is the workflow designer. Its a WPF control that you can create in your application. Not in an ASP.NET or Silverlight application, but you can provide the smart client so that users update the workflow definition using a robust designer like you use in VS2010.

The biggest problem with WF4 is the asynchronous nature of the execution. You will need to use the SynchronizationContext to complete the actions and wait for the workflow to start working in a new state before you return the received HTML to the browser.

+3
source share

All Articles