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.. :)