none
SPD2010 Workflow Error - The workflow could not update the item, possibly because one or more columns for the items require a different type of information RRS feed

  • Question

  • My environment is:

    • MOSS 2010 Enterprise
    • Custom developed SPD 2010 workflow
    • InfoPath 2007 client form submitting to document library kicking off the workflow on create & change
    • Document library does not require check-out and has versioning on

    After a clean IIS restart, the workflow for a submitted form kicks off perfectly.  However, the workflows for subsequent form submissions immediately fail.   The workflow error is as follows (from Workflow Status screen) Event Type = Error   User ID = System Account  Description = The workflow could not update the item, possible because one or more columns for the item require a different type of information.  Outcome = Unknown

    I also have users with InfoPath 2010 client submitting the same form template and they do not receive the same experience.   The workflow starts but does not execute immediately....instead the workflow status shows "The item is currently locked for editing. Waiting for item to be checked in or for the lock to be released."   The workflow does not appear to continue until the worflow rehydrates (I changed the workflow timer from 5 minutes to 1 minute to test this theory).   At this point, the lock appears to be released and the workflow proceeds as expected.

    I noticed that the InfoPath form in the document library appears to be exclusively locked by the person who submitted the form.

    Any ideas why this lock is occurring and how to resolve it?


    Thursday, July 29, 2010 3:58 PM

All replies

  • The behavior seems to indicate the forms need to be checked-in.  You said check-out was not required, so then that leaves the possibility that you have a required field (in SharePoint, thought, not in InfoPath) that isn't being populated, which would cause the item to enter a checked-out status until the required field is completed, and the item can be checked in.

    What actions does your workflow perform?


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Sunday, August 22, 2010 1:47 AM
  • We seem to be getting this error about half the time from infopath forms submitted to a SP 2010 form library.  There are no required fields (that I can tell from the library settings).  There are three required fields on the form itself: two people picker bound to text required fields and a date required field.  I have noticed through testing several varieties of the workflows and trying to log to a new list that sometimes the Title is not populated when the form is first created (submitted to the library - created kicked the test workflow off which showed (No Title) as the updated field on the list for logging) which seems odd.  Any directions to help solve this would be greatly appreciated. 
    Wednesday, January 26, 2011 3:52 PM
  • Hi Michelle, I am running into the same issue, have you found the solution?

    Friday, March 4, 2011 9:47 PM
  • Good day

    I have a re-usable workflow running on a content type of type Document Set. The workflow copies the Name field from a new item to another string field in the item. This workflow is associated with the content type and is allowed to be started manually, when a new item is created and when it is updated

    It works the first three times after being freshly deployed or an iisreset but then also gives the same error as above

    Here is my log file output

    03/14/2011 09:23:59.89  w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72er Medium   Microsoft.SharePoint.SPException: The file WFtest/Name16 has been modified by (unknown) on 14 Mar 2011 09:23:59 +0200. ---> System.Runtime.InteropServices.COMException (0x81020037): <nativehr>0x81020015</nativehr><nativestack></nativestack>The file WFtest/Name16 has been modified by (unknown) on 14 Mar 2011 09:23:59 +0200.     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileN... 
    03/14/2011 09:23:59.89* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72er Medium   ...ame, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     --- End of inner exception stack trace ---    ... 
    03/14/2011 09:23:59.89* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72er Medium   ... at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boole... 
    03/14/2011 09:23:59.89* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72er Medium   ...an bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename)     at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename)     at Microsoft.SharePoint.SPListItem.Update()     at Microsoft.SharePoint.Workflow.SPWinOEWSSService.CommitUpdateDocument(Transaction txn, Object[] transData) 
    03/14/2011 09:23:59.89  w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72fe High     Error in commiting pending workflow batch items: Microsoft.SharePoint.SPException: The file WFtest/Name16 has been modified by (unknown) on 14 Mar 2011 09:23:59 +0200. ---> System.Runtime.InteropServices.COMException (0x81020037): <nativehr>0x81020015</nativehr><nativestack></nativestack>The file WFtest/Name16 has been modified by (unknown) on 14 Mar 2011 09:23:59 +0200.     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boole... 
    03/14/2011 09:23:59.89* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72fe High     ...an bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)  ... 
    03/14/2011 09:23:59.89* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72fe High     ...   --- End of inner exception stack trace ---     at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boo... 
    03/14/2011 09:23:59.89* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72fe High     ...lean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename)     at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename)     at Microsoft.SharePoint.SPListItem.Update()     at Microsoft.SharePoint.Workflow.SPWinOEWSSService.CommitUpdateDocument(Transaction txn, Object[] transData)     at Microsoft.SharePoint.Workflow.SPPendingWorkBatch.Commit(Transaction transaction, ICollection it... 
    03/14/2011 09:23:59.89* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        72fe High     ...ems) 
    03/14/2011 09:23:59.90  w3wp.exe (0x1E04)                        0x2398 SharePoint Foundation          Monitoring                     b4ly Medium   Leaving Monitored Scope (Request (POST:https://intranet.astrapak.com:443/_layouts/NewDocSet.aspx?List=53fb581f%2Da477%2D4d21%2Da082%2D16833d9f4fea&RootFolder=%2FWFtest&ContentTypeId=0x0120D52000883B73BDCB0E014BBDC2E61770887EEA00C9FAB07A639A704398B47DAABF54ABA2&IsDlg=1)). Execution Time=825.9969 b10fa738-a7b5-4d1a-b97c-f2453ac44177
    03/14/2011 09:23:59.90  w3wp.exe (0x1E04)                        0x1634 SharePoint Foundation          Monitoring                     b4ly High     Leaving Monitored Scope (EnsureListItemsData). Execution Time=7.5221 
    03/14/2011 09:23:59.90  w3wp.exe (0x1E04)                        0x1634 SharePoint Foundation          Monitoring                     b4ly High     Leaving Monitored Scope (Event Receiver (Microsoft.AnalysisServices.SharePoint.Integration, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, Microsoft.AnalysisServices.SharePoint.Integration.GeminiActions)). Execution Time=17.5953 
    03/14/2011 09:23:59.90  w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        88xr Unexpected WinWF Internal Error, terminating workflow Id# 436808e0-4e3b-4c84-bf03-c4d709d1d734 
    03/14/2011 09:23:59.90  w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        98d4 Unexpected System.Workflow.Runtime.Hosting.PersistenceException: The file WFtest/Name16 has been modified by (unknown) on 14 Mar 2011 09:23:59 +0200. ---> Microsoft.SharePoint.SPException: The file WFtest/Name16 has been modified by (unknown) on 14 Mar 2011 09:23:59 +0200. ---> System.Runtime.InteropServices.COMException (0x81020037): <nativehr>0x81020015</nativehr><nativestack></nativestack>The file WFtest/Name16 has been modified by (unknown) on 14 Mar 2011 09:23:59 +0200.     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Obj... 
    03/14/2011 09:23:59.90* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        98d4 Unexpected ...ect& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallb... 
    03/14/2011 09:23:59.90* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        98d4 Unexpected ...ack, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     --- End of inner exception stack trace ---     at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter... 
    03/14/2011 09:23:59.90* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        98d4 Unexpected ... pUniqueFieldCallback)     at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename)     at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename)     at Microsoft.SharePoint.SPListItem.Update()     at Microsoft.SharePoint.Workflow.SPWinOEWSSService.CommitUpdateDocument(Transaction txn, Object[] transData)     at ... 
    03/14/2011 09:23:59.90* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        98d4 Unexpected ...Microsoft.SharePoint.Workflow.SPPendingWorkBatch.Commit(Transaction transaction, ICollection items)     at System.Workflow.Runtime.WorkBatch.PendingWorkCollection.Commit(Transaction transaction)     at System.Workflow.Runtime.WorkBatch.Commit(Transaction transaction)     at System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)     at System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)     at System.Workflow.Runtime.WorkflowExecutor.CommitTransaction(Activity activityContext)     at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)     --- End of inner exception stack t... 
    03/14/2011 09:23:59.90* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        98d4 Unexpected ...race ---     at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)     at System.Workflow.Runtime.WorkflowExecutor.System.Workflow.ComponentModel.IWorkflowCoreRuntime.PersistInstanceState(Activity activity)     at System.Workflow.ComponentModel.Activity.MarkClosed()     at System.Workflow.ComponentModel.Activity.ReleaseLockOnStatusChange(IActivityEventListener`1 eventListener)     at System.Workflow.ComponentModel.FaultAndCancellationHandlingFilter.SafeReleaseLockOnStatusChange(ActivityExecutionContext context)     at System.Workflow.ComponentModel.FaultAndCancellationHandlingFilter.OnEvent(Object sender, ActivityExecutionStatusChangedEventArgs e)     at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.Activity... 
    03/14/2011 09:23:59.90* w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation          Workflow Infrastructure        98d4 Unexpected ...ExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)     at System.Workflow.Runtime.Scheduler.Run() 
    03/14/2011 09:23:59.93  w3wp.exe (0x1E04)                        0x1E60 SharePoint Foundation

    Any ideas?

    I've tried setting a workflow variable to the value first and then updating the list item, but this doesn't make any difference...

     

    Monday, March 14, 2011 7:51 AM
  • I've also just checked the settings on the document library:

     

          Require content approval for submitted items? No

    Create a version each time you edit a file in this document library? No versioning

    Require documents to be checked out before they can be edited? No

    This workflow copies the value from the required Name field to another string field (optional)

     There were some calculated columns on the content type, I removed it and removed all workflows, and re-added the workflow, still getting the error...

     

    • Edited by nuclear Monday, March 14, 2011 9:47 AM
    Monday, March 14, 2011 8:05 AM
  • Any required fields?
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Monday, March 14, 2011 8:44 AM
  • This workflow copies the value from the required Name field to another string field (optional)

     There were some calculated columns on the content type, I removed it and removed all workflows, and re-added the workflow, still getting the error...

    Monday, March 14, 2011 9:48 AM
  • As the creator of the original issue, I thought I'd weigh in on my resolution to this.   My experience was somewhat inconsistent with this error...the workflow would sometimes work and other times not (but usually for a couple of times after an iisreset).    I also had no required columns nor anything else I could find out of the ordinary.

    My first clue as to what was going on came when I had to migrate the SharePoint front-end temporarily to an older generation server (same SharePoint config though)....suddenly the workflows all worked!  However when I migrated back to the lightening fast Xeon X7560-based server, the workflows started failing again.

    It appeared to me that maybe it was a locking/timing issue....it appeared the workflow kicked off and tried updating fields in the doc library item before the locks were released on the InfoPath form that created the item!

    At this point I had nothing to lose....so I updated the workflow and inserted a 1 minute pause as the first step.   That's all it took, the workflow has not failed since that day.

    Now, if I could only discover why the InfoPath form submit lock was still in place when the workflow kicked off, I could get rid of the pause step to make things a little cleaner...


    Monday, March 14, 2011 1:39 PM
  • Just setting the field to a normal string (no lookup into another field) even gives the error

    Something I need to add is that this is run on a Document Set content type. When you create a new Document Set it basically creates a folder, so there is no document that you upload, so it needs to create that firstly in the background. It also then automatically opens the Document Set with the Welcome page, which means it accesses the item again. So there is a lot of competition of this item...

    The 1 minute pause does work...but this would only set the field that I need in other workflows, like when I create a Invoice content type inside the document set I want to use this field to set it as my reference to the Document Set, yes there isn't a direct relationship visible in the workflows between the documents inside a document set to the document set...

    Thanks

     

    Monday, March 14, 2011 2:15 PM
  • I'm also running in to this issue. Having a workflow connected to a documentset that run on create item.

    Worklow only copies value from a calculated field to a text field.

    In my case I get the error inconsistent and have also tried the same workflow in another farm where it seems to be almost error - free.

    Adding the 1 minut pause, I have also tried, and agrees it seem to work, but it then puts the workflow in the WF service job - so usually it results in a longer delay.

    I tried to get the workflow to do some updates on the item - but it did not help anything.

    Any ideas on how to do this without the 1 minut pause?

    Finaly I have also tried to run it manually - this also seems to run without error.

    /Morten

    Thursday, March 17, 2011 6:17 PM
  • You can mitigate some of the effects of the 1 minute pause by altering the SharePoint workflow timer job to run every minute.   You can view your job definitions in Central Admin or use stsadm job-workflow command or powershell scripts.   

    Good luck and please let me know if you find another solution!

    Tuesday, March 22, 2011 12:16 AM
  • We have the same problem as well.  The 1 minute pause fixes this but the "update an item" action fails no matter what the update with the same error.  It would be nice to hear the official response as right now we are going through the process of replacing update an item actions with web service calls to the update an item web service and that seems to work.
    Friday, July 15, 2011 11:36 PM
  • in the end we created an EventReceiver to act on the newly added file and access the Document set and change the values...

     

    Friday, October 14, 2011 11:50 AM
  • Here is my solution to this:

    1) I checked the workflow and got rid of my errors (like updating not-existent test fields, etc).

    2) I configured clients' locale to match the server's locale, at least as a workaround (my awkward workflow passes some date and time values from date to string and to date value again, so I  thought getting text snapshot of a date in a different locale might be an issue).

    3) Important one: changed the first line of the workflow to wait for the document to be unlocked. Is it the same as the 1 minute pause you mentioned? Anyway, the workflow takes 1-3 minutes instead of 10-12 minutes before this action.

    4) Checked for fields: not required either in the form or sharepoint as you mentioned, but the fields actually read and updated by the workflow: I notices that users left some optional fields blank, but the workflow needs them. I did not make them required (for a reason apart), but I changed their formatting in the form and warned users to avoid blank fields.

    5) I checked permissions: for some unknown reason every workflow initiated by a test user with admin rights runs OK. Same workflows to update read-only items via impersonation step by users with lower privileges 50/50 end with the error (though the author of the impersonation step has all the permissions). - I did not make this out, but you might check this in your environment.  

    It works OK now.

     


    Friday, January 13, 2012 11:09 AM
  • I was experiencing this error and after reading Alexander's post, discovered that it was occurring because a step in my workflow was referencing a field that I had deleted.  Once I deleted that step, the error cleared.

    Hope this helps someone else.

    Friday, March 23, 2012 6:39 PM
  • Having the same issue here as well. Going to try the 1 minute delay because this doesn't do it all the time. My guess is this workflow goes out of memory and times out before being able to rename the file then subsequent items it works cause it's in memory. The 1 minute delay probably fixes it because it compiles the workflow into memory for the rename step of the name field and works fine. I will report back if this fixes my issue as well but that would be my guess why this is working. 
    Monday, May 14, 2012 5:46 PM
  • Also having this issue as described above.  I've been wondering if it is permission based since test users and my account with admin rights generate no errors, but when the workflow process is kicked off by a user with basic contribute or approve rights the "The item is currently locked for editing. Waiting for item to be checked in or for the lock to be released." shows in the log and the workflow does not finish correctly and the infopath form appears to be locked as well.   Document check out is not required here.  There has to be a solution to this that doesn't require elevating users rights...

    NLewis

    Wednesday, May 30, 2012 9:38 PM

  • I am having the same problem for adding List Item from custom web part. Workflow doesn't Auto-Start when i add new Item Pragmatically but works fine when i add List Item using InfoPath 2010 Entry form (Customized using Info Path Designer).

    I decided to start workflow pragmatically. Here is my code that i used to start work from Event Receiver at ItemAdded (...)

    private static void StartWorkflow(SPListItem listItem, string workflowName)
    {
        // Get the workflow by name that's associated with the list item
        SPWorkflowAssociation wfAssoc = listItem.ParentList.WorkflowAssociations.GetAssociationByName(workflowName, System.Globalization.CultureInfo.CurrentCulture);

        // Start the workflow
        listItem.Web.Site.WorkflowManager.StartWorkflow(listItem, wfAssoc, wfAssoc.AssociationData, true);
        listItem.Update();
    }

    First time it works but from the next time it shows the following error:


    My SharePoint Environment:

    • SP 2010 Ent (Build Version 14.0.4762.1000)
    • SPD 2010 Workflow

    Any solution??

    Wednesday, January 16, 2013 12:33 PM
  • Finally I have solved my problem.

    Let me Explain How to solve this.

    I have change the code to Start Workflow which executes faster that the previous one

    public void StartWorkflow(SPListItem listItem, SPSite spSite, string wfName)
    {
      SPList parentList = listItem.ParentList;
      SPWorkflowAssociationCollection associationCollection = parentList.WorkflowAssociations;
      foreach (SPWorkflowAssociation association in associationCollection)
      {
        if (association.Name == wfName)
        {
           association.AutoStartChange = true;
           association.AutoStartCreate = false;
           association.AssociationData = string.Empty;
           spSite.WorkflowManager.StartWorkflow(listItem, association, association.AssociationData);
         }
       }
    }

    For more Details please read http://jainnitin2411.wordpress.com/2012/07/06/programmaticallystartsharepointworkflow/

    Then i called it from Entry From "Save" Button instead of Event Receiver
    currentWeb.AllowUnsafeUpdates = true;
    call StartWorkflow(...);

    //This has to be after start workflow otherwise you will face another Error "Save Conflict.\n\nYour changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes."

    currentWeb.AllowUnsafeUpdates = false;

    Hope this will help you!!

    Thursday, January 24, 2013 7:15 AM