开发者

Workflow's UpdateAllTasks method clears out DueDate field

I have problem with UpdateAllTasks activity.

Before executing this activity, I have a task as seen in workflow history here: workflow history task pending http://img101.imageshack.us/img101/2694/ss20100525163401.png But开发者_开发百科 when task gets finished, i`m calling UpdateAllTasks to update some properties for every task, but DueDate column for all tasks are cleared as seen here: workflow history task completed http://img204.imageshack.us/img204/7889/ss20100525163817.png

This particular thing is happening in updateTaskData activity with such properties:

updateTaskDataProperties = new SPWorkflowTaskProperties();
updateTaskDataProperties.ExtendedProperties["WorkflowData"] = WorkflowDataSerializer.SerializeToXmlString<ApprovalWorkflowRuntimeData>(WorkflowData);

A workaround with drawbacks

There is a workaround however which would satisfy someone. If we add such a line

updateTaskDataProperties.DueDate = ApprovalTaskProperties.DueDate;

then it works as expected. Unless you haven't edited tasks due date by other means (for example in GUI). Then it will reset back to DueDate that was specified for task to which ApprovalTaskProperties belongs to.

Why?

Why is such thing happening and maybe there is a cure for that? Otherwise i`ll have to go with the workaround which prevents adjusting due date.


Not an excellent answer, but at least a workaround:

In UpdateAllTasks we must specify the DueDate property:

updateTaskDataProperties.DueDate = ApprovalTaskProperties.DueDate;

then it works as expected. Unless you haven't edited tasks due date by other means (for example in GUI). Then it will reset back to DueDate that was specified for task to which ApprovalTaskProperties belongs to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜