Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to set the delay activity programatically in a state machine workflow using Visual studio with SharePoint2010.

This is being set in the method.

private void delayActivity1_InitializeTimeoutDuration(object sender, EventArgs e)
        {
            this.delayActivity1.TimeoutDuration = System.TimeSpan.Parse("00:30:00");

        }

Unfortunately the timeoutduration is being ignored and the setting in the GUI properties is being used. I put in a breakpoint in the method and it does indeed show TimeoutDuration being set correctly. It look like a bug. Is there anyway to get this to work pls

share|improve this question

1 Answer 1

The remarks section for DelayActivity.InitializeTimeoutDuration states:

This event should not be used to set the TimeoutDuration for a DelayActivity. The time-out duration should be set in the workflow's InitializeComponent method instead.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.