Workflow task expired
In a workflow, task expiration is an important step. Instead of leaving the process in a certain step, you must continue the process within the specified time.
We useDelayAndListenControl. UseListenTo monitor whether the task has expired. If the task has expired, the process follows:DelayBranch. The displayed page displays "the task has expired !".
SetDelayactivity1ControlTimeoutdurationAttribute. When you want the task to expire, you can set the length of time. You can directly set or create an attribute to assign an expiration value to the attribute. For example:
Create attributes:
Public timespan delayactivity1_timeoutduration1 = Default (System. timespan );
Set the task to expire after five minutes:
Delayactivity1_timeoutduration1 = New Timespan ( 0 , 5 , 0 );
InCodeactivity1Write settings for expired tasks, as shown in figure:
Private Void Delaycode ( Object Sender, eventargs E)
{
Isbm= True;
This. Completetask?taskoutcome= "Task expired!";
}
RelatedSource codeAs follows:
Delay and listen