After long chase behind this issue finally I figured out the solution.
Issue : You create a new workflow using SharePoint designer and publish it. but suddenly notice that the workflow status says - Failed to start. after further research on buddy Google you know that there are some files which are not checked in which are causing workflow not to start. (Reference - Here)
You again go to SPD and see - oh yes , why these xoml and xsn files are still checked out? never mind , you go ahead and tries to check in the files. but what?? you gets an error message - cannot perform this operation, the file is no longer checked out or has been deleted. and you wonder why??
Solution :
There are couple of solutions which I found over the web , so I will mention all of them and the one which worked for me.(which I had to figure out).
[Update]: Note that below approach was verified with SharePoint 2010, however for similar issues of SP 2013 and workaround for the same - please take a look at comments section.
When you create a new SharePoint workflow using SPD , it gets stored in to the hidden document library in site - known as Workflows. This library is similar to other document libraries in SharePoint which has many fields to store metadata. Whenever you create new workflow , there are some files which gets created - like xoml , config and xsn. by default - the "Name" column in initiated with the file name but Title remains empty.
In my case - Title column was marked as "Required". and this was the reason SPD was throwing an error as it was not able to find the Title field value before checking in. but the Error message was kind of generic one.
Solution was simple - make the Title column in the workflow library optional. but how to do that ? as workflow library is hidden.
Well that's simple -(steps mentioned are for SharePoint Designer 2010)
I hope this helps someone. Happy Coding.. :)
Issue : You create a new workflow using SharePoint designer and publish it. but suddenly notice that the workflow status says - Failed to start. after further research on buddy Google you know that there are some files which are not checked in which are causing workflow not to start. (Reference - Here)
You again go to SPD and see - oh yes , why these xoml and xsn files are still checked out? never mind , you go ahead and tries to check in the files. but what?? you gets an error message - cannot perform this operation, the file is no longer checked out or has been deleted. and you wonder why??
Solution :
There are couple of solutions which I found over the web , so I will mention all of them and the one which worked for me.(which I had to figure out).
- Clear SharePoint Designer Cache - There are already many articles on this.you can refer Here.
- Check Alternate Access Mapping - Many blogs said that one should check the AAM on the server for your site collection. but for my case this was not possible as I was working on SharePoint Online. Reference Here.
- Check the required fields -
[Update]: Note that below approach was verified with SharePoint 2010, however for similar issues of SP 2013 and workaround for the same - please take a look at comments section.
When you create a new SharePoint workflow using SPD , it gets stored in to the hidden document library in site - known as Workflows. This library is similar to other document libraries in SharePoint which has many fields to store metadata. Whenever you create new workflow , there are some files which gets created - like xoml , config and xsn. by default - the "Name" column in initiated with the file name but Title remains empty.
In my case - Title column was marked as "Required". and this was the reason SPD was throwing an error as it was not able to find the Title field value before checking in. but the Error message was kind of generic one.
Solution was simple - make the Title column in the workflow library optional. but how to do that ? as workflow library is hidden.
Well that's simple -(steps mentioned are for SharePoint Designer 2010)
- Open SharePoint Designer.
- Select All files from left navigation. select workflows and go to properties. (right click workflows > properties) , and you will see workflow list settings.
- In this window - find customization section and click on Edit list columns.
- Make sure that the Title column is set as optional. If it is required - right click > column settings > and check allow blank values > click ok and save.
- and you are done. now you should be able to check in workflow files.
I hope this helps someone. Happy Coding.. :)
This helped me today! I both cleared my SPD cache and I checked in files within the workflows that were left as checked out. This post helped me a lot. Thank you very much.
ReplyDeleteBrilliant - the Title column fix helped! Thank you so much. :-)
ReplyDeleteThank you man!!! Hey, I owe you ! the Title column fix was absolutely what I needed!!!
ReplyDeleteExcellent! I have been looking for a solution to this issue for ages. My Title column wasn't required, but this helped me to find that I had 3 other columns that were required. Made two of them optional and deleted the third and PRESTO! my workflow runs!!! Thank you!
ReplyDeleteThanks so much for this! The third option seems to be the charm. Does anyone have any idea why the Title field for the workflow library would suddenly be set to required?
ReplyDeleteThanks from me too... the third option saved me and my mind sanity :-)
ReplyDeleteThank you very much Bhusan. It saved a lot of time. I am going to keep this article in my blog as a reference.
ReplyDeleteYou are amazing! This came up on a new workflow and workflows i had republished and couldn't figure out why they were not working...we had a new field applied portal wide that was required and well it popped up on the workflow list too. Doesn't need to be there so I removed it. THANKS SO MUCH!
ReplyDeleteThanks SharePoint Experts and Julie for the comment. Glad that blog helped you :)
ReplyDeleteSetting the Title field to optional worked for me too - thanks so much! :)
ReplyDeleteThanks Bhushan, your blog provided great details and has solved my problem. You save a lot of my time.
ReplyDeleteAmazing, such a simple fix - saved me days of frustration! Thank you so very much for posting this and making the steps easy to follow. The required title was the issue even though the error I was getting when trying to check in my Infopath form said "Cannot perform this operation. The file is no longer checked out or has been deleted."
ReplyDeleteThanks! great help!
ReplyDeleteThanks, worked :-)
ReplyDeleteIt did take a few minutes for the fix to seem to make a difference, but once it did, everything worked beautifully!
ReplyDeleteIf the above did not resolve your issue, while in sharepoint designer, and whilst editing the workflow, save your workflow and PUBLISH it. (this handy publish will resolve the missing workflow item from the list it is attached to)
ReplyDeleteThanks Bhushan for putting this together.
ReplyDeleteI ran into the issue you described in your 3rd option. Problem is in this case I can't navigate to the 'All Files' from Designer for this particular subsite (nothing shown in the view). Even though I have enabled all SharePoint Designer Settings from Web app and Site collection levels. Is there any other way of getting to Workflow settings page?
Many thanks in advanced!
Thank you , after 2 days of searching your solution actually worked. I had to do a combination of cache clearing and the checkin but thank you for the solution.
ReplyDeleteGreat post, and still very helpful - thanks! Wanted to mention, when editing columns in SharePoint Designer 2013 the Required column is not exposed as it was in the above illustration, but there is a workaround.
ReplyDeleteTo get to all of the column properties, copy the ListID from the workflow list properties panel in SPD 2013 (minus brackets), and in your browser access the list settings for a different list on the site. Replace the ListID portion of the URL in your browser location bar, then press Enter.
Also worth noting: On a site I was troubleshooting, the workflow library had inherited multiple required fields from changes that someone made to a parent content type, and inadvertently applied to all content types that were based on that parent. Comparing the workflow library settings in a different "clean" collection helped us figure out which columns did not belong. Once we deleted those and changed Title to Optional, we were able to check in the workflow library files and republish, which then made the workflow available to the associated library.
-- Tod Beane