Right-click anywhere on the white space of the workflow open in the Workflow Designer and selectWorkflow Business Rulesfrom the context menu.
Enter a name for the Business Rule in the Workflow Business Rules window that opens and click on theAddbutton.
Double-click the new rule to create an event handler for it.
Add code for the Business Rule in the C# Editor that opens.
Apply the rule to activity lines
Right-click one of the lines proceeding from an activity where more than one outcome is possible and chooseSelect Line Rulefrom the context menu.
In the Select Rule window that appears, from theRuledrop-down list, select the rule. To have the process flow through the line when afalsecondition is met, select the If Rule Not True option. Otherwise leave the option cleared.
ClickOKto close the Select Rule window.
Repeat the process for the second line proceeding from the same activity, this time setting theIf Rule Not Trueoption to the opposite as that set for the first line.
The lines change color after the Business Rules are applied.
Key
Orange lines indicate that the attached business rule evaluates to false.
Blue lines indicate that the attached business rule evaluates to true.
Black lines indicate that there is no business rule applied.