Three important concepts we will use in this chapter are conditions, rules, and rule sets. In WF, conditions are chunks of logic that return true or false. A number of WF activities utilize conditions to guide their behavior. These activities include the While
activity, the IfElseBranch
activity, and the ConditionedActivityGroup
. The While
activity, for instance, loops until its Condition
property returns false. We can implement conditions in code or in XML.
Rules are conditions with a set of actions to perform. Rules use a declarative if-then-else style, where the if
is a condition to evaluate. If the condition evaluates to true, the runtime performs the then
actions, otherwise the else
actions. While this sounds like procedural code, there are substantial differences. The if-then-else constructs in most languages actively change the flow of control in an application. Rules, on the other hand, passively wait for an execution engine to evaluate their logic...