Bearbeiten

ActivityValidationServices.Validate Method

Definition

Verifies that a workflow activity is correctly configured according to the validation logic. This logic can be the CacheMetadata(CodeActivityMetadata) method of the activities to validate, or build and policy constraints.

Overloads

Validate(Activity)

Verifies that a workflow activity is correctly configured according to the validation logic. This logic can be the CacheMetadata(CodeActivityMetadata) method of the activities to validate, or build and policy constraints.

Validate(Activity, ValidationSettings)

Verifies that a workflow activity is correctly configured according to the validation logic. This logic can be the cacheMetadata method of the activities to validate, or build and policy constraints.

Remarks

Custom activity authors can provide validation logic in an activity's CacheMetadata override. Any exceptions that are thrown from CacheMetadata are not treated as validation errors. These exceptions will escape from the call to Validate and must be handled by the caller.

Validate(Activity)

Verifies that a workflow activity is correctly configured according to the validation logic. This logic can be the CacheMetadata(CodeActivityMetadata) method of the activities to validate, or build and policy constraints.

public:
 static System::Activities::Validation::ValidationResults ^ Validate(System::Activities::Activity ^ toValidate);
public static System.Activities.Validation.ValidationResults Validate (System.Activities.Activity toValidate);
static member Validate : System.Activities.Activity -> System.Activities.Validation.ValidationResults
Public Shared Function Validate (toValidate As Activity) As ValidationResults

Parameters

toValidate
Activity

An element from a workflow activity tree.

Returns

A collection of validation errors, each of which can contain the name of the validated activity, a descriptive message, an error code, and other information.

Remarks

Custom activity authors can provide validation logic in an activity's CacheMetadata override. Any exceptions that are thrown from CacheMetadata are not treated as validation errors. These exceptions will escape from the call to Validate and must be handled by the caller.

Applies to

Validate(Activity, ValidationSettings)

Verifies that a workflow activity is correctly configured according to the validation logic. This logic can be the cacheMetadata method of the activities to validate, or build and policy constraints.

public:
 static System::Activities::Validation::ValidationResults ^ Validate(System::Activities::Activity ^ toValidate, System::Activities::Validation::ValidationSettings ^ settings);
public static System.Activities.Validation.ValidationResults Validate (System.Activities.Activity toValidate, System.Activities.Validation.ValidationSettings settings);
static member Validate : System.Activities.Activity * System.Activities.Validation.ValidationSettings -> System.Activities.Validation.ValidationResults
Public Shared Function Validate (toValidate As Activity, settings As ValidationSettings) As ValidationResults

Parameters

toValidate
Activity

An activity from a workflow activity tree.

settings
ValidationSettings

An object that determines the behavior of the validation method on the workflow , can suppress the internal validation logic, and can also contain the policy constraints.

Returns

A collection of validation errors, each of which can contain the name of the activity that is configured incorrectly, a descriptive message, an error or warning code , and other information.

Remarks

Custom activity authors can provide validation logic in an activity's CacheMetadata override. Any exceptions that are thrown from CacheMetadata are not treated as validation errors. These exceptions will escape from the call to Validate and must be handled by the caller.

Applies to