Pages

Search This Blog

Saturday, November 26, 2011

Delay Activity Timeout Duration

If using delay activity in workflow and want to set timeout duration dynamically, do not use delay activity object directly in the code.To set timeout duration, need to type cast the sender object into delay activity and assign the time. Please refer below code for the same.

private void delayActivity1_InitializeTimeoutDuration(object sender, EventArgs e)
{
(sender as DelayActivity).TimeoutDuration = new TimeSpan(0, 5, 0);
}

No comments:

Post a Comment