locked
Workflow not triggered automatically RRS feed

  • Question

  • Hello Experts,

    We have a MOSS installation (Enterprise Edition) and we have sporadic problems with Workflows.

    We use form Libraries to store InfoPath forms. In most of them we have created workflows (usually for customized notifications) which should be triggered automatically when a new item is added in the Library. Most of the forms are stored in the Library by BizTalk WSS Adapter. In most of the forms the workflow is triggered successfully.

    But there are some cases where the workflow is not even triggered. For these cases under ULS we can see 3 "suspicious" entries for every workflow not triggered:

     

    SPWorkflow.FetchData: Microsoft.SharePoint.SPException: Cannot complete this action.  Please try again. ---> System.Runtime.InteropServices.COMException (0x80004005): Cannot complete this action.  Please try again.     at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListItemWorkflowAsSafeArrayAndLock(String bstrUrl, String bstrListName, Int32 lItemID, Guid workflowInstanceId, UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet, Int32& pHasInstanceData)     at Microsoft.SharePoint.Library.SPRequest.GetListItemWorkflowAsSafeArrayAndLock(String bstrUrl, String bstrListName, Int32 lItemID, Guid workflowInstanceId, UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet, Int32& pHasInstanceData)     --- End of inner exception stack trace ---     at Microsoft.SharePoint.Library.SPRequest.GetListItemWorkflowAsSafeArrayAndLock(String bstrUrl, String bstrListName, Int32 lItemID, Guid workflowInstanceId, UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet, Int32& pHasInstanceData)     at Microsoft.SharePoint.Workflow.SPWorkflow.FetchData()

     

     

     

     

     

    Start Workflow: System.ArgumentNullException: Value cannot be null.     at Microsoft.SharePoint.Workflow.SPWorkflow.retrieveSchema(Schema schemaIndex)     at Microsoft.SharePoint.Workflow.SPWorkflow.IStatusData()     at Microsoft.SharePoint.Workflow.SPWorkflow.GetIStatus(Int32 i)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.<>c__DisplayClass15.<RunWorkflowElev>b__12()     at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()     at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(SPListItem item, SPFile file, SPWorkflowAssociation association, SPWorkflowEvent startEvent, Boolean bAutoStart, Boolean bCreateOnly)

     

     

     

     

     

    AutoStart Workflow: System.ArgumentNullException: Value cannot be null.     at Microsoft.SharePoint.Workflow.SPWorkflow.retrieveSchema(Schema schemaIndex)     at Microsoft.SharePoint.Workflow.SPWorkflow.IStatusData()     at Microsoft.SharePoint.Workflow.SPWorkflow.GetIStatus(Int32 i)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.<>c__DisplayClass15.<RunWorkflowElev>b__12()     at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()     at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(SPListItem item, SPFile file, SPWorkflowAssociation association, SPWorkflowEvent startEvent, Boolean bAutoStart, Boolean bCreateOnly)     at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.AutoStartWorkflow(SPItemEventProperties properties, Boolean bCreate, Boolean bChange, AssocType atyp)

    Any ideas ??

    Thanks.


    Dimitris Porikos
    Friday, August 5, 2011 2:28 PM

Answers

  • Hi Dimitris,

    This issue is happened when the multiple auto-start workflows attach on the same list item/document, but it has been fixed by the hotfix package wsskb983307fullfile (Jun, 2010),  you can update the patch for your SharePoint 2007.
    http://support.microsoft.com/kb/983307

    Thanks,
    Daniel


    Regards, Daniel
    • Marked as answer by Wayne Fan Monday, August 15, 2011 1:59 AM
    Monday, August 8, 2011 10:43 AM
    Moderator
  • Hi Dimitris,

    You need to patch every SharePoint Server in your farm, and keep the server version as the same.
    It is recommended to back up the database before the update.
    http://support.microsoft.com/kb/875358

    Thanks,
    Daniel


    Regards, Daniel
    • Marked as answer by Wayne Fan Monday, August 15, 2011 1:59 AM
    Friday, August 12, 2011 12:31 PM
    Moderator

All replies

  • Hi Dimitris,

    This issue is happened when the multiple auto-start workflows attach on the same list item/document, but it has been fixed by the hotfix package wsskb983307fullfile (Jun, 2010),  you can update the patch for your SharePoint 2007.
    http://support.microsoft.com/kb/983307

    Thanks,
    Daniel


    Regards, Daniel
    • Marked as answer by Wayne Fan Monday, August 15, 2011 1:59 AM
    Monday, August 8, 2011 10:43 AM
    Moderator
  • Hello Daniel,

    Thanks for the response. 

    In our case we don't have several workflows assigned to a Document Library but only one.

    However, we can try the patch because of this: 

    "You configure a workflow to start automatically when a new item is added to a SharePoint Server 2007 document library. When you add several items to the document library, not all the workflow instances that correspond to the items are started automatically."

    Do I have to apply the patch to every server in our farm ?

     


    Dimitris Porikos
    Thursday, August 11, 2011 3:07 PM
  • Hi Dimitris,

    You need to patch every SharePoint Server in your farm, and keep the server version as the same.
    It is recommended to back up the database before the update.
    http://support.microsoft.com/kb/875358

    Thanks,
    Daniel


    Regards, Daniel
    • Marked as answer by Wayne Fan Monday, August 15, 2011 1:59 AM
    Friday, August 12, 2011 12:31 PM
    Moderator