Business rules are a crucial part of most software systems because they allow the translation of real business requirements to executable code. Many times business rules are treated as second-class citizens when they are simply lumped in with all the rest of the code that makes up an application. Because businesses can change over time, optimally you should be able to change business rules in a more eloquent way than just tweaking and redeploying the code it.
In addition, you may find that some implementations of business rules are looser or tighter than others. For example, there are well-known algorithms for evaluating rules in a set. A couple of these are the Rete algorithm and sequential algorithms. Plenty of resources on the Web discuss the semantics of business rules and various algorithms along with their pros and cons. The purpose of this chapter is to cover the rules implementation in Windows Workflow Foundation, so other extraneous information is kept to a minimum.
To some people, business rules are simply if-else statements in code that loosely tie to some business requirement. Luckily, in Windows Workflow Foundation, rules are much more than this.
The following topics are covered in this chapter:
Declarative rule conditions