locked
Can you change the warning tooltip "One or more children have validation errors or warnings" RRS feed

  • Question

  • In a rehosted workflow designer, when an Activity in the designer is missing some context (for example), the red error icon appears and the tooltip message is always "One or more children have validation errors or warnings".

    Is it possible to customize that tooltip message to something more specific to the activity itself?

    Tuesday, August 10, 2010 4:51 PM

Answers

All replies

  • Hi Kofoed,

    I tryed with CacheMetadata without success. We have no way to get child errors.

    Idem with Contraints.


    Jérémy Jeanson MCP, MCTS http://blogs.codes-sources.com/JeremyJeanson/ (French or English spoken)
    • Proposed as answer by JeremyJeansonMVP Wednesday, August 11, 2010 7:47 AM
    • Unproposed as answer by Kofoed Wednesday, August 11, 2010 6:49 PM
    Wednesday, August 11, 2010 7:47 AM
  • Hi,

    This thread could be helpful to you:
    http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/237b8b5c-5f99-4051-84fc-2dd01b548c91

    Regards
    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support. My Blog:http://xhinker.com
    • Proposed as answer by Congyu Li - MSFT Tuesday, August 24, 2010 3:59 AM
    • Marked as answer by Kofoed Tuesday, August 24, 2010 4:09 PM
    Thursday, August 12, 2010 9:16 AM
  • Thanks Andrew - I think that's helpful.

    I have a question about using the Metadata ... how can I check whether a required argument for my Activity is supplied or not?  I'm overriding the CacheMetadata method and in there I need to check to see if a particular OutArgument (for example) has been set ... if it has not, I want to show a ValidationError.

    I tried checking the Expression.Result of the argument in my activity, but that doesn't work.  It seems I may be able to verify by checking the ExpressionText value of the Expression, however I'm not sure how to get that at runtime.  Any ideas?

    This is my current code:

        [RequiredArgument]
        public OutArgument<Patient> Patient { get; set; }
    
        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
          base.CacheMetadata(metadata);
          
          if (Patient == null)
          {
            metadata.AddValidationError(
              new ValidationError(
                "Value for required activity argument 'Patient' is not supplied",
                false,
                "Patient"));
          }
        }
    
    Thursday, August 12, 2010 4:27 PM
  • Hi Kofoed,

    We are talking about Children (and children in subtree) activity, not activity's properties.


    Jérémy Jeanson MCP, MCTS http://blogs.codes-sources.com/JeremyJeanson/ (French or English spoken)
    Friday, August 13, 2010 8:27 AM
  • Not sure what u mean, Jeremy.
    Monday, August 16, 2010 4:21 PM
  • Hi, Kofoed,

    The question about OutArgument is tracked in this thread http://social.msdn.microsoft.com/Forums/en/wfprerelease/thread/5608f332-e57e-47f6-bf67-4e94af0dd955. I proposed Andrew's reply as answered to close this thread.

    Thanks,

    Congyu

    Tuesday, August 24, 2010 3:59 AM