Two activities in Windows Workflow thrive on conditions and rules. These activities are the Policy Activity and the Conditioned Activity Group (CAG). Although we could have listed the CAG as a control flow element, the CAG doesn't control the flow of execution as much as allow it to be controlled by conditions and rules.
The CAG is a powerful activity that can use a combination of rules and code to reach a goal. The CAG conditionally executes activities until a condition evaluates to true. Inside of the CAG is a storyboard where we can drop activities for execution (see the screenshot on the next page). The CAG associates a WhenCondition
with each activity in its storyboard, and the CAG will only execute an activity if the activity's WhenCondition
evaluates to true. The CAG continues to re-evaluate the WhenCondition
and re-execute the storyboard activities until its own UntilCondition
evaluates to true.
The WhenCondition
and UntilCondition...