Compartilhar via


Workflow Task Lock issue !

Sometimes when the number of items in the list gets high ( say more than 1500 ) we might get to see the Tasks getting locked issue for some of the items. In the SharePoint UI, the exception is “This task is currently locked by a running workflow and cannot be edited”

The ULS logs will give some fair idea on the issue.

 

0x0BAC Windows SharePoint Services Workflow Infrastructure 936l High Engine RunWorkflow: System.Workflow.Activities.EventDeliveryFailedException: Event "OnTaskChanged" on interface type "Microsoft.SharePoint.Workflow.ITaskService" for instance id "b4077790-6160-4eea-8696-863238532f57" cannot be delivered. ---> System.ArgumentNullException: Buffer cannot be null. Parameter name: buffer at System.IO.MemoryStream..ctor(Byte[] buffer, Boolean writable) at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.LoadWorkflowInstanceState(Guid instanceId) at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance) at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationContext context, WorkflowInstance workflowInstance)

This exception says that the workflow is not able to deliver the all the events at a given time and so the tasks get locked. OOB, the default event delivery throttle value is 15. The value can be increased using STSADM command

stsadm -o setproperty -pn workflow-eventdelivery-throttle -pv "50"

For more details on using the command : https://technet.microsoft.com/en-us/library/cc287939.aspx

Comments

  • Anonymous
    March 13, 2009
    Thanks for hte post....i got the same error.but was not able to get rid of it with the throttle change...any help?
  • Anonymous
    March 13, 2009
    Can you give more details about the no. of workflow instances, tasks created ?
  • Anonymous
    July 15, 2009
    Hello,My workflow gave an error. I searched different solutions resolve for this error. But i don't resolve that. Anyone help to me?Thanks...This task is currently locked by a running workflow and cannot be edited.   at Microsoft.SharePoint.SPListItem.PrepareItemForUpdate(Guid newGuidOnAdd, Boolean bMigration, Boolean& bAdd, Boolean& bPublish, Object& objAttachmentNames, Object& objAttachmentContents, Int32& parentFolderId)  at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents)  at Microsoft.SharePoint.SPListItem.Update()  at Microsoft.SharePoint.Workflow.SPWorkflowTask.AlterTask(SPListItem task, Hashtable htData, Boolean fSynchronous)  at Microsoft.Office.Workflow.WrkTaskIPPage.XmlFormControl_OnClose(Object sender, EventArgs e)  at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.CloseDocument(EventLogStart eventLogStart)  at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.PlayServerMessages(EventLogStart eventLogStart)  at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.OnDataBindHelper()  at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.OnDataBinding(EventArgs e)  at System.Web.UI.WebControls.WebParts.Part.DataBind()  at System.Web.UI.Control.DataBindChildren()  at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)  at System.Web.UI.Control.DataBindChildren()  at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)  at System.Web.UI.Control.DataBindChildren()  at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)  at System.Web.UI.Control.DataBindChildren()  at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)  at System.Web.UI.Control.DataBindChildren()  at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)  at Microsoft.Office.Workflow.WrkTaskIPPage.OnLoad(EventArgs ea)  at System.Web.UI.Control.LoadRecursive()  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  • Anonymous
    November 12, 2009
    Hi,Thanks for the post. I got the same error message (“This task is currently locked by a running workflow and cannot be edited”). The message I got under Workflow Infrastructure category is different from yours. The message is "WinWF Internal Error, terminating workflow Id# 475db363-e8ee-4b8b-b5a4-fcf1e3018432".Please help me