Resolution: MOSS: Cannot execute multiple tasks in workflow


MOSS: Cannot execute multiple tasks in workflow when user tried to modify the second task, the page will be freeze for 2 min and after that nothing it will modify, status will be same. second time when user tries to modify, he gets an error.

Error Message:

"This task is currently locked by a running workflow and cannot be edited"


Some objects like SPWeb,SPUser should be NonSerializable and in SPWorkflowTask.AlterTask, last parameter is for synchronization, we set it to false.


In workflow, please set the NonSerialized attributes for the m_l2User, m_l3User
variables as mentioned below.
private SPUser m_l2User = null;
private SPUser m_l3User = null;

In ApproveNewTo.aspx.cs
SPWorkflowTask.AlterTask(m_taskListItem, taskHash, true);
SPWorkflowTask.AlterTask(m_taskListItem, taskHash, false);

Comments (0)

Skip to main content