locked
Suppressing Workflow Activity Validation Errors RRS feed

  • Question

  • I would need to suppress the validation errors for the workflow activities.

    Basically I'm creating a custom activity which composes couple of workflow activities. When I drag drop my custom activity in Rehosted designer it is showing all the validation errors of workflow activities which needs to be suppressed.

    How to suppress validation errors ?

    Thursday, November 11, 2010 12:45 PM

Answers

  • are you taling about the red ballon?

    the red ballon won't be removed.

     

    • Marked as answer by prabashmi Tuesday, November 16, 2010 6:43 AM
    Monday, November 15, 2010 9:31 AM

All replies

  • there is a reg key to turn off the validation error. @"ADD HKEY_CURRENT_USER\Software\Microsoft\.NETFramework\v4.0.0.0\System.Activities.Presentation /v DisableValidateOnModelItemChanged /t REG_DWORD /d 00000001 /f"
    Friday, November 12, 2010 1:37 AM
  • it seems, this disables validation for all the activities....... but my requirement is to disable validations only for a specific set of activities. For example error validation has to be disabled only for RECEIVE activity .. ..  How to do this ?

     

    Friday, November 12, 2010 8:26 AM
  • I think the only thing you can do is not to display the validation error on the rehost app, but the validation error is still there, just won't be seen by the users.

    can this meet your request?

    Please refer to this link

    http://msdn.microsoft.com/en-us/library/ff521568.aspx

    you can filter the errors in the passed in list, and just display what you want the user to see.

     

    Saturday, November 13, 2010 3:02 AM
  • Still this is not removing the specific errors from the activity diagram.

    Here is my code sample . .  .

    public void ShowValidationErrors(IList<ValidationErrorInfo> errors)
      {
       _errorList.Clear();
       foreach (var error in errors)
       {
        if (error.Message == "The OperationName property must be set in activity 'Receive'.")
        {
         continue;
        }
        _errorList.Add(error);
       }
       errors.Clear();
    
    Monday, November 15, 2010 9:23 AM
  • are you taling about the red ballon?

    the red ballon won't be removed.

     

    • Marked as answer by prabashmi Tuesday, November 16, 2010 6:43 AM
    Monday, November 15, 2010 9:31 AM
  • Ok....Thanks.

    Tuesday, November 16, 2010 6:43 AM