Scenario: We have both Winforms and MVC code that is being used to work on a nat
ID: 643211 • Letter: S
Question
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?
Explanation / Answer
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.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.