Using the IfElseBranchActivity Activity

The IfElseBranchActivity activity represents a branch of an IfElseActivity activity that is executed if the IfElseBranchActivity activity's Condition property is set to true. You can add as many IfElseBranchActivity activities as you want to an IfElseActivity activity, and you can add as many activities as you want to each IfElseBranchActivity activity.

You put a condition on each IfElseBranchActivity activity that used in a IfElseActivity activity except the last IfElseBranchActivity activity. This is because it is treated as the Else branch. If the evaluation of the condition sets the IfElseBranchActivity Condition property to true, the activities that are contained in the IfElseBranchActivity activity are executed; otherwise, the next IfElseBranchActivity condition is evaluated, and so on.

For information about conditions, see Using Conditions in Workflows. For information about IfElseActivity, see Using the IfElseActivity Activity.

For a code sample that demonstrates how to use the IfElseBranchActivity activity, see Simple Sequential Workflow.

See Also

Reference

IfElseActivity
IfElseBranchActivity

Concepts

Using the IfElseActivity Activity
Using Conditions in Workflows
Rules and Conditions Overview

Other Resources

Simple Sequential Workflow Sample
Windows Workflow Foundation Activities