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

  • 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.5456 

    Some Points I found:

    1. I can log the Workflow History which is after "OnTaskCreated" Activity.
    2. I can change the task after removing the "OnTaskCreated" Activity.
    3. when I am using "OnTaskCreated" Activity the Error is occurred in "OnTaskChanged" Activity. After Removing the  "OnTaskCreated" Activity the "OnTaskChanged" Activity is working fine.
    4. 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

All replies