1

I have to come up with an idea on how to transparently create invoices. Customers are diverse and usually government type institutions. As such, they have strict rules for creating invoices and what goes into them. The rules are very specific and different between customers. For example:

  • For every 10 items, another invoice needs to be created
  • If a specific service is going into invoice, materials used should be excluded
  • Some items are free of charge either by contract or by law
  • Some really expensive items must go into separate invoices

Rules are IMO too diverse to be saved in relational database in a traditional form and they are too flexible to be hard coded into the system. So, the question is: how would you solve this challenge?

Nezreli
  • 1,278
  • 4
  • 16
  • 34

2 Answers2

3

Windows Workflow Foundation is designed to address these types of problems. It contains an expression engine for evaluating which steps should be taken based on a series of conditions such as customer properties etc.

Here's an introduction to the framework: Link

And another introduction to its rules / expression engine: Link

Brian Scott
  • 9,221
  • 6
  • 47
  • 68
  • 1
    You need a bunch of programmers to maintain rules in WF. The invoicing process in question doesn't look to be perfect for it - WF is fine for a factory that produces cars or plains but not for invoicing at all. Plain .NET rule engine would work best here. –  Jul 13 '11 at 00:51
  • By plain old .NET rule engine you mean - what? WF rule engine or something else? – Nezreli Jul 13 '11 at 08:05
  • @MTG: You can simply host the WWF workflow designer in your own application to allow the users to maintain / create process workflows as they see fit. If a powerful / completely user configurable solution is required then I'd suggest looking at the enterprise level K2 Black Pearl software suite. – Brian Scott Jul 13 '11 at 08:39
2

You should use a Business Rules Engine (BRE).

There are several options :

Rudy
  • 7,008
  • 12
  • 50
  • 85
  • I'm not sure about this. Documentation appears to be nonexistent at least on the site linked. If I choose technology like this I need to know that it works and has a good support online if I get in trouble. – Nezreli Jul 13 '11 at 08:07
  • There was a debate on old question http://stackoverflow.com/questions/230011/drools-net-vs-windows-workflow-foundation-wf – Rudy Jul 13 '11 at 09:35
  • There is some documentation http://www.acumenbusiness.com/Wiki/Installation.Rule%20Editing.ashx – Sentient Nov 10 '12 at 19:04