Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Configuring Activity Validation

Activity validation enables activity authors and users to identify and report errors in an activity’s configuration prior to its execution. Windows Workflow Foundation (WF) provides the following three types of activity validation:

  • RequiredArgument and OverloadGroup attributes.

  • Imperative code-based validation.

  • Declarative constraints.

RequiredArgument and OverloadGroup attributes indicate that certain arguments on an activity are required. Imperative code-based validation provides a simple way for an activity to provide validation about itself, and declarative constraints enable validation about the activity and its relationship with the containing workflow. If an activity is not configured properly according to the validation requirements, validation errors and warnings are returned. If the containing workflow is created using the workflow designer, any validation errors and warnings are displayed in the designer. If the workflow is created outside of the workflow designer any validation errors are returned when the workflow is invoked. Regardless of how the workflow was created, a workflow with validation errors is never allowed to execute. This section provides an overview of these types of activity validation and how activity validation is invoked.

In This Section

Required Arguments and Overload Groups
Describes how to use the RequiredArgument and OverloadGroup attributes to provide validation.

Imperative Code-Based Validation
Describes how to use code-based validation for CodeActivity and NativeActivity based activities.

Declarative Constraints
Describes how to use declarative constraints to provide complex activity validation.

Invoking Activity Validation
Discusses when activity validation is invoked automatically and how to explicitly invoke validation.

Reference

Related Sections




Build Date:

2012-08-02
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.