This documentation is archived and is not being maintained.

How to: Create a Declarative Rule Condition (Legacy)

This topic describes how to declare a rule condition using the legacy Windows Workflow Designer that targets the .NET Framework version 3.5 or the .NET Framework 3.0.

A condition statement evaluates to True or False. A declarative rule condition is a condition statement that is created by using the Rule Condition Editor Dialog Box (Legacy) and stored as XML with the workflow. It can include predicates that compare workflow state and Boolean algebra that combines multiple predicates.

Declarative rule conditions are used in the following Windows Workflow Foundation out-of-box activities:

To create a declarative rule condition using the Rule Condition Editor

  1. In the activity's Properties window, click the Condition property or UntilCondition property, depending on the activity.

  2. Select Declarative Rule Condition from the list for the property.

  3. Expand the Condition or UntilCondition property.

  4. Click the ConditionName property.

  5. Click the ConditionName ellipses […] to open the Select Condition dialog box.

  6. Click New Condition to open the Rule Condition Editor dialog box.

  7. Type the expression for the condition in the Condition text box.

    For information about how to create condition expressions, see Rule Condition Editor Dialog Box (Legacy).

  8. When you are finished creating the condition expression, click OK to close the dialog box and create the rule condition with an assigned name.

    The Select Condition dialog box opens.

    For information about how to use the Select Condition dialog box, see Select Condition Dialog Box (Legacy).

See Also