How and when should I be valid in custom designs / custom activity factories / custom designers in WF 4.0
The only place within my activity that provides verification error support, is within the CacheMetadata method (I believe it is often during the design process Is it) Is it validating me? Is there support for verification within the Designer Designer? Yes, your activity has cash metadata where you should do your validation validation is a concept that worksflow runtime. Also applies to the designer. (You can see from this fact that you can still try to run workflow, compiled or declarative, which contains verification errors, but an exception will be thrown when you do.)
Example :
Protected Override Zero Cache Metadata (Activity Metadata Metadata) {if (it.bd == 0) metadata.Defination error (new verification error ("You (for a body of this activity Forgot to supply) ", / * iswar Ning = * / true, "body")); }
(see)
Your secondary question is there support to add verification to the activity designer side? The answer is 'no, not really' - it is possible to do some custom WPF and data binding which adds some 'custom verification' above the activity designer, perhaps to define your own activity's characteristics to satisfy its own satisfaction. You can also use AttachedPropertiesService for But this is extra work, and it is not going to tie with the constant order verification, so this is a limited price idea.
No comments:
Post a Comment