Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Scenario: We have both Winforms and MVC code that is being used to work on a nation wide multi-user platform that does lots of logistics for lots of users. Tax rules change per state and even per city or county. These tax rules make a huge difference for our industry.

The other issue is that rules can change based on legislation. The system will have to handle cases where before a date it works one way and then different after that date. This changeover will need to be entered into the system and tested before that date comes.

Proposed Solution: Use Workflow Foundation to create a time based system where our users can change and add rules that change the way taxes are calculated.

Question: I have not used Workflow Foundation and searching has returned books to look at but not a lot of examples of people using this technology successfully. Is my scenario a good use of Workflow Foundation?(I think so.) If you have any experience with Workflow Foundation, any tips on making this work well?

share|improve this question
up vote 1 down vote accepted

Just like WPF, Workflow Foundation has a pretty steep learning curve to become proficient with it. That being said it is a very powerful framework albeit with a few quirks. Depending on your time frame for delivery, there are alternatives for embedding a simple rules engine into your application.

One option, which I had moderate success with is to create your own rules engine that is based on conditions and results. Basically, we had a logistics application that needed to apply different tariffs (rates), mileage calculations, and delivery times (among other calculations) based on different conditions such as origin/destination of the shipment, who the customer was, who the shipper was, what kinds of materials were being shipped, etc.

I created a "contract" system that allowed users to enter conditions and map them to various terms. So for example a shipment for customer A originating from Chicago destined for Texas would have a five day delivery deadline. When a user entered a new shipment, the system would match the shipment against the terms and apply the specified conditions automatically to the shipment.

Your system appears to have the same problem. Taxes can be applied to shipments (I'm assuming that's what you're handling because you mentioned logistics) based on origin, destination, and date. You can preload new tax rules and they would match when they apply. It's all data driven, so you wouldn't have to re-deploy to accommodate new tax rules.

Hope this helps.

share|improve this answer

This sounds more like a rules management and implementation problem than a workflow management problem. I'd consider using a BRMS (Business Rules Management System), which vary in weight and complexity. SRE is a fairly lightweight open source rules engine that folks like.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.