views:

261

answers:

2
+1  Q: 

WPF or workflow?

Hey People,

I have a question and hopefully you can steer me in the right direction.

I'm working on an application that needs some form of decision tree/work flow for lack of a better term. I'll describe it below for some clarity.

I have a request form that users will fill out on a web page. At the beginning of the form is a 'Referral Type'. Bases on the referral type selected some of the form questions will change. There could be 2, 3 or 4 groups of questions depending on the Referral type. Entire groups of questions can be pass or fail.

If the first group of questions fail..then the form stops processing, etc.

What would be the best approach to handle this? Would WPF work well in this situation?

+2  A: 

WPF is the Windows Presentation Foundation and is more about the User Interface than a work flow management system. For work flow, you could build your own home-grown database driven solution, or you could use tools like Ultimus or Sharepoint.

You may also be thinking of the Windows Work Flow Foundation.

I have used both Ultimus and home-grown implementations for work flow management. Peers have used Sharepoint. There are benefits or pros/cons to each.

RSolberg
ahh..gotcha. Thanks for clearing it up the WPF/WFF difference.
chopps
A: 

I am unsure how well Workflow works with ASP.NET as I've never tried it. I believe some of the samples may actually cover this so it's possible. That is the first technical hurdle.

It sounds like the logic isn't too complicated. There are a finite number of "paths" that a user can take based on the referral type. Each path is fairly linear, with 2-4 "groups" of questions. Can each group sit on a single page? That would simplify things greatly.

A web framework such as Spring.NET Web Framework might be better suited for this task than Workflow. You are trying to express some condition logic--essentially, "go to the next page if X, else end questioniare". Spring.NET handles this exact sort of logic with its Validation Framework and the Results Mapping.

Workflow is certainly well-suited for this kind of logic, but is there anything that happens in reasponse to each group of questions other than validation? If not, it may be overkill.

James Schek
Yes..it will all be on one page. If the user checks a few radio boxes and the it causes the group to fail then the user can not process the form, etc. If all groups pass then the can submit the form.
chopps
How can Spring.NET help me with this?
chopps
Spring.NET Web Framework has a UI Agnostic Validation Framework; combine that with "result mapping" to define flow of pages based on the validated input entered on a page.
James Schek