How to: Create a Declarative Rule Condition
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 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:
- ConditionedActivityGroup
- IfElseBranchActivity
- ReplicatorActivity
- WhileActivity
- SequentialWorkflowActivity
- StateMachineWorkflowActivity
To create a declarative rule condition using the Rule Condition Editor
In the activity's Properties window, click the Condition property or UntilCondition property, depending on the activity.
Select Declarative Rule Condition from the list for the property.
Expand the Condition or UntilCondition property.
Click the ConditionName property.
Click the ConditionName ellipses […] to open the Select Condition dialog box.
Click New Condition to open the Rule Condition Editor dialog box.
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.
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.
See Also
Reference
Rule Condition Editor Dialog Box
Select Condition Dialog Box
Concepts
Other Resources
Using the ConditionedActivityGroup
Using the IfElseBranchActivity Activity
Using the Replicator Activity
Using the While Activity
Using Conditions in Workflows
Copyright © 2007 by Microsoft Corporation. All rights reserved.