none
"Failed to Start" SharePoint Designer Workflow

    Question

  • Hi there,

    Microsoft SharePoint Designer 2010, 14.0.4763.1000
    Microsoft SharePoint Server 2010, 14.0.4763.1000

    I have a regular Team Discussion in which I have created a SharePoint Designer Workflow. To create the workflow, I opened SharePoint Designer, and under Workflows clicked "List Workflow" and select "Team Discussion". The workflow is called "Test Workflow". I amended the start options for the workflow to be:

    Allow this workflow to be manually started: Yes
    Require Manage List permissions: No
    Start workflow automatically when an item is created: Yes
    Start workflow automatically when an item is changed: Yes

    I created the workflow as follows:

    Step 1 > Update item in Current Item (Field: Body, Value: [%Current Item:Body%]+"aaaaa")

    I then publish the workflow.

    When I create a new item, the text "aaaaa" is not added.

    If I select the item, and start the workflow manually I get: "Failed on Start" and:

    Event Type, User ID, Description
    Workflow Cancelled, System Account, Workflow Test Workflow was canceled by System Account
    Error, System Account, Test Workflow failed to start

    In the ULS logs I see (filtered for Category of "Workflow Infrastructure"):

    Category, Level, Message
    Workflow Infrastructure, Unexpected, RunWorkflow: System.ArguementException: Item does not exist. It may have been deleted by another user.

    NB Same error on other workflows on other lists I am trying to create as well.

    This is a developer machine. I installed SharePoint using SPFarmSetup and used SPFarmAdmin account. My development login is my own developer user account who is a Farm Administrator and has site admin rights. I also tried to wrap the steps with an impersonate step, but same issue.

    Restarted the machine. Noticed that on logging in again a number of updates had been applied.

    Opened the site, and noticed that the workflow was no longer associated with the list.

    Opened the workflow again in SPD.

    Tried to publish the workflow and received (under Advanced): "Could not publish the workflow because configuration file contains errors."

    Deleted the workflow, and created a new one.

    Same error ("Failed to Start").

    Any help much appreciated.

    Regards,

    Ben


    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    • Edited by Webtechy Monday, December 06, 2010 11:17 AM
    Monday, December 06, 2010 10:03 AM

Answers

  • Hi all,

    after several rounds with the MS support and the escalation team, and with the help of the Time Travel Trace dump, a solution was found. 

    Basically the problem was in fact related with the versioning state of the SPD workflow files. The files in the workflow publishing process were not checked in and so no other user could access them, which lead to the errors described in the post above. And the reason for the fail in the check-in was because the list that has the workflow files has a Title field that was set to required and not Optional as it should be.

    This was due to the fact that the Title field is being inherited from somewhere at the sitecollection level where it is being "Required". We suspect that this is happening at the “Document” parent level (by default the Title for the “Document” content type is “optional”). That needs to be changed.

    Solution: One needs to go to the Document content type and verify if the "Title" field is set to "Required". If it is, click on "Title" and then change it to "Optional" and save the change (this might return an error stating it can't propagate the change to some content types, but it propagated to the workflow lists ).

    Hope this helps anyone with the same problem!
     


    Raul Queiroga, Microsoft Partner and MCP
    Wednesday, March 16, 2011 4:32 PM

All replies

  • Web Application Pool - SharePoint - 80
    DEVDOMAIN\MossServiceAccount

    Farm Account
    DEVDOMAIN\MossFarmAdmin

    In services.msc the SharePoint 2010 Timer service is Started with the DEVDOMAIN\MossFarmAdmin account

    I do have the following two warnings:

    The server farm account should not be used for other services: DEVDOMAIN\MossFarmAdmin, the account used for the SharePoint timer service and the central administration site, is highly privileged and should not be used for any other services on any machines in the server farm. The following services were found to use this account: Web Analytics Data Processing Service (windows Service).

    Accounts used by the application pools or service identities are in the local machine Administrators group: Using highly-privileged accounts as application pool or as a service identities poses a security risk to the farm, and could allow malicious code to execute. the following services are running as accounts in the machine Administrators group: SharePoint Central Administration v4 (Application Pool), SPTimerV4 (Windows Service), WebAnalyticsService (Windows Service)

    The Unattended Service Account Application ID is not specified or has an invalid value: The unattended Service Account is a single account that all documents can use to refreshd ata. It is required when connecting to data sources external to SharePoint, such as SQL. Without a valid Unattended Service Account Application ID, Visio Graphics Services will not refresh Web Drawings that are connected to external data sources. the rule for the Unattended Service Account Application ID failed: The ID does not exist. Visio Graphics Service.
    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    Monday, December 06, 2010 10:23 AM
  • I also deleted the workflow cache from here:

    %System Drive%\Users\%user%\AppData\Local\Microsoft\WebSiteCache

    Then re-opened SPD, saved and published the workflow.

    The workflow is now at least being started automatically but still "Failed on Start".
    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    Monday, December 06, 2010 10:33 AM
  • I then decided to grant full permission to the "Service Account". Went to Grant Permissions and then search for "Service" in the accounts and added:

    MOSS Service Account
    SP2010 Service Account

    Grant them user permissions directly, full control (this was done at the root site as permissions were inherited on the site I was working on).

    I also set the settings for the "Style Resource Readers" for "Who can view the membership of this group" to "Everyone".

    Still "Failed to Start".


    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    Monday, December 06, 2010 10:54 AM
  • Also confirmed the PublicKeyTokens matched in All Files > Workflows > Test workflow > Test Workflow > Test Workflow.xoml with what is in the GAC (right-click on select open as XML).

    NB It shows

    Test Workflow.xoml
    Test Workflow.xsn

    As checked out (even after a refresh) but if I select check-in, it says "Cannot perform this operation. The file in no longer checked our or has been deleted".
    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    Monday, December 06, 2010 11:05 AM
  • Added a condition to the workflow.

    Resaved and re-published.

    Still returned "Failed to Start".

    Opened up Test Workflow.xoml.wfconfig.xml.

    Contents are as follows:

    <WorkflowConfig Version="14.0.0.4762">
        <Template BaseID="{ADCD7198-5E3D-4E5D-A740-7F1261320442}" DocLibID="{30556AC5-B250-4798-9D62-143FC81B5AD5}" XomlHref="Workflows/Test Workflow/Test Workflow.xoml" XomlVersion="V1.0" TaskContentType="0x01080100C9C9515DE4E24001905074F980F93160" Category="List" Name="Test Workflow" Description="" RulesHref="Workflows/Test Workflow/Test Workflow.xoml.rules" RulesVersion="V2.0"/>
        <Association ListID="{6FE73990-0AC7-4154-B6E3-B2805D0757DD}" StartManually="true" TaskListID="{CF2B0E36-9203-49D5-83CE-5F0EA7DB9992}" HistoryListID="{1A252B00-B54D-47FB-BE34-F8FFA42BF30D}" StartOnCreate="true" StartOnChange="true"/>
        <ContentTypes/>
        <Initiation URL="_layouts/IniWrkflIP.aspx">
            <Fields/>
            <Parameters/>
            <DefaultData>
                <dfs:myFields xmlns:xsd="http://www.w3.org/2001/XMLSchema " xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types " xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution " xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields " xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields " xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes " xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ">
                    <dfs:queryFields/>
                    <dfs:dataFields>
                        <d:SharePointListItem_RW/>
                    </dfs:dataFields>
                </dfs:myFields>
            </DefaultData>
        </Initiation>
        <Extended>
            <Fields/>
        </Extended>
        <MetaData>
            <ExtendedStatusColumnValues>
                <StatusColumnValue>Canceled</StatusColumnValue>
                <StatusColumnValue>Approved</StatusColumnValue>
                <StatusColumnValue>Rejected</StatusColumnValue>
            </ExtendedStatusColumnValues>
            <Instantiation_FormURI Version="V1.0">Workflows/Test Workflow/Test Workflow.xsn</Instantiation_FormURI>
        </MetaData>
    </WorkflowConfig>

     

    NB <WorkflowConfig Version="14.0.0.4762"> and RulesVersion="V2.0".


    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    Monday, December 06, 2010 11:14 AM
  • OK, quick update:

    Using the same SharePoint Designer on another site I can create workflows.

    I have installed the latest Cumulative Update, still same issue.

    Created a new site collection on my dev server, and could create workflows that worked.

    I therefore suspect the issue is due to the SharePoint Infrastructure Publishing, so enabled that on the new site collection and SharePoint Server Publishing on the site. But could still create workflows fine.

    The issue is therefore specific to this site collection but no idea why or how to correct it.

    I therefore moved the site across to the new site collection (saving as a template) and the workflows worked fine. I suspect that disabling the publishing related features may fix the issue, but was cautious of doing this as could imagine this would break the site somewhat.


    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    Monday, December 06, 2010 5:50 PM
  • Hi Ben,

    Have you found a solution for this issue?

    Best Regards,

     


    Raul Queiroga, Microsoft Partner and MCP
    Monday, January 10, 2011 7:18 PM
  • I am experiencing the exact same issue and would love to hear if anyone has found a resolution. SP Designer Workflows were working properly until I changed my network password.  I spent most of last week on the phone with MS Tech Support, but he wasn't able to figure out what is wrong.

    Regards,

    leannarh

    Tuesday, February 08, 2011 4:49 PM
  • If you have the option, try creating a new site collection (that doesn't use publishing) and implementing your workflow in there. At least see if that works anyway.
    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    Tuesday, February 08, 2011 5:06 PM
  • I have done that several different ways.  I did a backup and restore to a new blank site collection - same issue.  I did an export/import with includeusersecurity - same issue.  I did a new Team site collection - no issue.

    leannarh

    Wednesday, February 09, 2011 5:57 PM
  • Well, this situation usually occurs after you change something in SharePoint Designer. If you remove what you changed before workflow started to failed, it will work again. So, better create a new one. I do not have server side access so I do not know any other solution.
    Monday, February 14, 2011 10:01 PM
  • Hi Ben,

    I appreciate you putting up all your diagnosis in this thread.  You have covered all bases and then some.  Unfortunately I am having the exact same issue as you have described.  I have also undertaken most of the steps you have without result, the only way I can successfully create workflows is using the farm installation account..

    If you or anyone else finds a fix for this bug I would appreciate it.

    Wednesday, February 16, 2011 2:46 AM
  • Hi All,

    I'm openning a suport ticket in Microsoft regarding this issue, I hope I get results this week...as soon as I get anything I'll post it. Until now, what I recon is that the problem should be related with the versioning state of the SPD workflow files. Basically when I publish the workflow, it's files (the .xoml and .xsn) remain check out (one can see them, in SPD, in the  Site Objects -> All Files) which probably then provoques the "Item does not exist. It may have been deleted by another user".

    The scenario I sent MS is the following:

    1. Running with a user (site collection administrator)
    1. Create a workflow (TesteWorkflowSPFarm) with one update list item action
    1. Deployment of workflow
      1. TesteWorkflowSPFarm.xoml e TesteWorkflowSPFarm.xsn stays Checked Out
        1. If one tries to check-in the files na error is returned "Cannot performance this operation. The file is no longer…"
          1. SOAP exception: System.Runtime.InteropServices.COMException (0x82000009): You must fill out all required properties before checking in this document.   

     at Microsoft.SharePoint.SoapServer.ListDataImpl.CheckInFile(String pageUrl, String comment, String CheckinType)   

     at Microsoft.SharePoint.SoapServer.ListDataValidatorImpl.CheckInFile(String pageUrl, String comment, String CheckinType)   

     at Microsoft.SharePoint.SoapServer.Lists.CheckInFile(String pageUrl, String comment, String CheckinType)

     

    1. Launch the workflow manually in na existing item
    1. Error "Failed toStart"

    RunWorkflow: System.ArgumentException: Item does not exist. It may have been deleted by another user.   

     at Microsoft.SharePoint.SPList.GetItemById(String strId, Int32 id, String strRootFolder, Boolean cacheRowsetAndId, String strViewFields, Boolean bDatesInUtc)   

     at Microsoft.SharePoint.Workflow.SPWorkflowNoCodeSupport.LoadWorkflowBytesElevated(SPWeb web, Guid docLibID, Int32 fileID, Int32 fileVer, Int32& userid, DateTime& lastModified)   

     at Microsoft.SharePoint.Workflow.SPWorkflowNoCodeSupport.<>c__DisplayClass1.<LoadWorkflowBytes>b__0(SPSite elevatedSite, SPWeb elevatedWeb)   

     at Microsoft.SharePoint.Workflow.SPWorkflowNoCodeSupport.LoadWorkflowBytes(SPWeb web, Guid docLibID, Int32 fileID, Int32 fileVer, Int32& userid)   

     at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(SPWorkflowAssociation association, SPWeb web)   

     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadDeclarativeAssembly(SPWorkflowAssociation association)   

     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(SPWorkflow workflow)   

     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)   

     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPWorkflowRunOptionsInternal runOptions)

    1. Running with SP_Farm
    1. Launch the workflow manually in na existing item
    1. Error
      1. Cannot open file "Workflows/TesteWorkflow/TesteWorkflow.xsn"
        1. probably because of lack of permissions to see the file

     


    Running with SP_Farm

    1. Create a new workflow (TesteWorkflowSPFarm) with one update list item action
    2. Deployment of  workflow
      1. TesteWorkflowSPFarm.xoml e TesteWorkflowSPFarm.xsn stays Checked Out
        1. If one tries to check-in the files na error is returned "Cannot performance this operation. The file is no longer"
    1. Launch the workflow manually in na existing item
    2. Sucess
    1. Running with a user (site collection administrator)
    1. Launch the workflow manually in na existing item
    1. Error
      1. Cannot open file "Workflows/TesteWorkflowSPFarm/TesteWorkflowSPFarm.xsn"
        1. probably because of lack of permissions to see the file
    1. Running with SP_Farm
    1. Launch the workflow manually in na existing item
    1. Sucess

    Raul Queiroga, Microsoft Partner and MCP
    Wednesday, February 16, 2011 11:48 AM
  • Hi all,

    after several rounds with the MS support and the escalation team, and with the help of the Time Travel Trace dump, a solution was found. 

    Basically the problem was in fact related with the versioning state of the SPD workflow files. The files in the workflow publishing process were not checked in and so no other user could access them, which lead to the errors described in the post above. And the reason for the fail in the check-in was because the list that has the workflow files has a Title field that was set to required and not Optional as it should be.

    This was due to the fact that the Title field is being inherited from somewhere at the sitecollection level where it is being "Required". We suspect that this is happening at the “Document” parent level (by default the Title for the “Document” content type is “optional”). That needs to be changed.

    Solution: One needs to go to the Document content type and verify if the "Title" field is set to "Required". If it is, click on "Title" and then change it to "Optional" and save the change (this might return an error stating it can't propagate the change to some content types, but it propagated to the workflow lists ).

    Hope this helps anyone with the same problem!
     


    Raul Queiroga, Microsoft Partner and MCP
    Wednesday, March 16, 2011 4:32 PM
  • Very useful, thanks for the feedback.
    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog: http://blog.webtechy.co.uk
    Thursday, March 17, 2011 9:47 AM
  • In my case I have change the namespaces on all the Aspx and workflow code files and forgot to change the Elements.xml property

    CodeBesideClass. Change this property to be your workflow namespace and should work.

    Wednesday, November 02, 2011 10:58 PM
  • Cause: When you modify the workflow without a checkout and publish it, the version of the workflow is not updated.


    Solution:
    To avoid this error "Failed on Start", always checkout the workflows before modifying them. Once the workflow is modified, first checkin and then publish it.


    When you checkout and checkin the workflows, the version is updated automatically and correctly. So make a habit to checkout the workflows always before modifying them.

    To checkout a workflow in SharePoint Designer 2010 go to All Files -> Workflows -> Your Workflow, and right click and select Check Out in the context menu. This will checkout the xoml, rules, and wfconfig.xml files.



    Thanks and Best Regards,


    Zakir Chougle
    SharePoint Developer
    Octaware Technologies, India.

     




    • Proposed as answer by Zakir HC Thursday, February 16, 2012 1:55 PM
    • Edited by Zakir HC Thursday, February 16, 2012 2:14 PM
    Thursday, February 16, 2012 1:52 PM
  • I've been experiencing this issue and have gone through the steps suggested to make the Title field "optional".  I've managed to get the workflow to function properly after making this change, but it only works when I make the change at the Item level, not at the List level.  I'm not too keen on the Title being optional (especially site-wide), so I tried out changing it to "optional", setting up the workflow, then changing it back to "required".  This actually works...unless I go back in and make any changes to the workflow.  At that point, I get the "Failed to Start" error, and in order to make the workflow function again I have to change the Title field back to "optional", then delete and recreate the workflow.  I can then change the Title field back to "required", but the functionality only holds so long as I don't edit the workflow.

    Has anyone had any luck getting it to work after changing the Title field *back* to "required"?

    Friday, May 11, 2012 8:37 PM
  • Had exactly the same problem! Very useful information. That solved my problem! Thanks!
    Wednesday, June 13, 2012 8:03 AM
  • Hey Guys, following is the solutions, the issue is because of the multiple versions of the worflow.

    Open you Workflow folder from Designer (All Files)

    Locate :xoml.wfconfig.xml file for your workflow

    Search for "RulesVersion" and change the value to "V1.0".

    Your workflow shall work.

    Regards..........


    One day your life will flash before your eyes, make sure its worth watching....

    Tuesday, July 31, 2012 6:50 AM
  • Hey Guys, following is the solutions, the issue is because of the multiple versions of the worflow.

    Open you Workflow folder from Designer (All Files)

    Locate :xoml.wfconfig.xml file for your workflow

    Search for "RulesVersion" and change the value to "V1.0".

    Your workflow shall work.

    Regards..........


    One day your life will flash before your eyes, make sure its worth watching....

    Tuesday, July 31, 2012 6:50 AM
  • Hey Guys, following is the solutions, the issue is because of the multiple versions of the worflow.

    Open you Workflow folder from Designer (All Files)

    Locate :xoml.wfconfig.xml file for your workflow

    Search for "RulesVersion" and change the value to "V1.0".

    Your workflow shall work.

    Regards..........


    One day your life will flash before your eyes, make sure its worth watching....

    Tuesday, July 31, 2012 6:50 AM
  • Hey Guys, following is the solutions, the issue is because of the multiple versions of the worflow.

    Open you Workflow folder from Designer (All Files)

    Locate :xoml.wfconfig.xml file for your workflow

    Search for "RulesVersion" and change the value to "V1.0".

    Your workflow shall work.

    Regards..........


    One day your life will flash before your eyes, make sure its worth watching....

    Tuesday, July 31, 2012 6:51 AM
  • In my case the reason was that my workflow was sending an e-mail, for the recepients from field "Assigned to". So when You select field in SPD 2010, You can double-click and select there how to parse the field. In my case there was "As string", and after migration from 2007 to 2010 it said "Failed on start" with this sympthoms. 

    I selected "Emails, with semicolon", republished, and workflow started to work.


    Best regards

    Tuesday, September 18, 2012 6:50 PM
  • Thanks Kamal Singh Kharayat!
    Avatar of Kamal Singh Kharayat

    Kamal Singh Kharayat

    Govt. Of Dubai

    390 Points500
    Recent Achievements
    Forums Replies IFirst Helpful VoteForums Answerer I
    It resolved my problem. How  I can avoid this multiple version?
    • Edited by Naomi365 Thursday, November 08, 2012 3:51 PM
    Thursday, November 08, 2012 3:50 PM
  • Thanks !

    I didn't find any solution yet, as everytime you update a workflow in SPD, it changes the Rules in form of XML, so a new version number is given, so for the time being we shall use this feature (this process for vesion modification to V1.0 is recommended by MS).


    One day your life will flash before your eyes, make sure its worth watching....

    Saturday, November 23, 2013 7:38 AM