Answered by:
This task is currently locked by a running workflow and cannot be edited in visual studio workflow.

Question
-
Hi All,
I am working on visual Studio 2010 Workflow. I am using the workflow to create the task.
I can create the first task. When I am going to change the task i.e. Approve or Reject, I am getting the following error :
Server Error in '/' Application.
--------------------------------------------------------------------------------
This task is currently locked by a running workflow and cannot be edited.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.SharePoint.SPException: This task is currently locked by a running workflow and cannot be edited.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SPException: This task is currently locked by a running workflow and cannot be edited.]
Microsoft.SharePoint.WebPartPages.DataFormWebPart.UpdateCallback(Int32 affectedRecords, Exception ex) +23778137
System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +4065620
Microsoft.SharePoint.WebPartPages.DataFormWebPart.FlatCommit() +312
Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e) +24
Microsoft.SharePoint.WebControls.SaveButton.OnBubbleEvent(Object source, EventArgs e) +687
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +70
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456Some Points I found:
- I can log the Workflow History which is after "OnTaskCreated" Activity.
- I can change the task after removing the "OnTaskCreated" Activity.
- when I am using "OnTaskCreated" Activity the Error is occurred in "OnTaskChanged" Activity. After Removing the "OnTaskCreated" Activity the "OnTaskChanged" Activity is working fine.
- I need "OnTaskCreated" Activity to apply/Update the Security/Permission on task and List Item.
Please help...
- Khan Abubakar
- Edited by Khan Abubakar Monday, July 23, 2012 11:24 AM "Point" to "Points"
Monday, July 23, 2012 11:23 AM
Answers
-
Hi,
Did you check this article:
Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
- Marked as answer by Lhan Han Thursday, August 2, 2012 6:15 AM
Monday, July 30, 2012 9:23 AM
All replies
-
Hello Khan,
This explains it in a clear way, along with the solution : http://blogs.code-counsel.net/Wouter/Lists/Posts/Post.aspx?ID=118
Mukesh AjmeraMonday, July 23, 2012 11:27 AM -
Hi Mukesh,
I have seen this blog.
I am on development stage but unable resolve the issue or I am unable to understand the solution given in the blog for development stage.
any help please. Its critical and urgent too.
Thanks in Advance.
- Khan Abubakar
- Edited by Khan Abubakar Tuesday, July 24, 2012 5:29 AM Added Comments.
Tuesday, July 24, 2012 5:28 AM -
Hi,
Did you check this article:
Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
- Marked as answer by Lhan Han Thursday, August 2, 2012 6:15 AM
Monday, July 30, 2012 9:23 AM