Question

We built a grant application system for a client. They've now asked for some simple workflow functionality (two approvals needed before the application is submitted).

I've given some thought to the database design that I'd use to encode the workflow requirements in a way that would offer maximum flexibility and reusability, and I'd be interested to know if there are any existing design patterns or best practices out there for this type of system. Any suggestions?

Note: This is a custom ASP.NET application, and we'll definitely be rolling our own workflow solution. I'm not interested in buying into a component, or much less moving this whole thing to a platform like SharePoint.

Was it helpful?

Solution

To not look at the Windows Workflow Foundation would be foolish. It was made for exactly what you require.

Here's an ASP.NET specific link.

OTHER TIPS

If the workflow functionality is so simple then your approach is enough. But if you want (or if the customer later asks for) more functionality like:

  • Reminders to approvers
  • Alerts to administrators
  • Escalations and reallocations of assignments
  • Cancellations of assignments
  • Rule-based allocations
  • Tracking of assignments

then you may have to consider a workflow component like Workflow Foundation.

An academic approach to workflow patterns can be found here and they are grouped in four categories:

I think that the more interesting category for your case is the Resource Patterns.

one solution that has worked well in the past is to create approval groups with members, approval codes as a simple lookup table, and soft-code the approval state-machine so that each step results from the assigning of an approval code to an item by a group member. This allows the group membership to change and the approval paths to change without having to re-code anything. You could also add code triggers and endpoints (via reflection, e.g. assembly name + class name + method name) to perform side-effect and commit/notification actions at each step

I have a similar query. There is a group of batch processes with interdependencies. I am working on a workflow like system for these batch processes.

Which of the following two designs is better:

  1. Database driven design where each process updates it's status and other details in database tables and other processes query these tables , or

  2. A JMS or messaging based approach where processes communicate with each other using messaging queues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top