I was working on a List workflow the other day in SharePoint Designer 2010. This list already had a workflow which was working perfectly fine and I needed another manual workflow in it.
No matter what I tried the workflow would fail and would log a message in the history list that Workflow failed to start and it was cancelled by System Account. I observed that the same happened with new workflows in that list, new workflows in other lists and I even tried creating new subsites and workflows were behaving the same way.
I googled for a while and there were many suggestions to clear SPD cache which did not help me. I played with SPD 2010 for a while and observed that the workflow xml and xoml files were checked out. I read in some blogs that this could cause this issue as well. I tried to check those files in but then I was greeted with a new error!
"Cannot perform this operation. The file is no longer checked out or has been deleted."
I had no clue what was happening because I could see the green arrow beside the workflow file and so it meant file was checked out. But then SPD did not allow me to check in the file. I tried the undo check out option but that did not work either. I was going crazy here because this didn't make much sense.
After spending some hair pulling moments reading lots of blogs and google searches I came across this Microsoft KB article:
SharePoint Designer 2007 workflows files can go into a checked out state and users will not be able to
check them back in
It said that there is a hidden document library called Workflow and it should basically have only three columns:
No matter what I tried the workflow would fail and would log a message in the history list that Workflow failed to start and it was cancelled by System Account. I observed that the same happened with new workflows in that list, new workflows in other lists and I even tried creating new subsites and workflows were behaving the same way.
I googled for a while and there were many suggestions to clear SPD cache which did not help me. I played with SPD 2010 for a while and observed that the workflow xml and xoml files were checked out. I read in some blogs that this could cause this issue as well. I tried to check those files in but then I was greeted with a new error!
"Cannot perform this operation. The file is no longer checked out or has been deleted."
I had no clue what was happening because I could see the green arrow beside the workflow file and so it meant file was checked out. But then SPD did not allow me to check in the file. I tried the undo check out option but that did not work either. I was going crazy here because this didn't make much sense.
After spending some hair pulling moments reading lots of blogs and google searches I came across this Microsoft KB article:
SharePoint Designer 2007 workflows files can go into a checked out state and users will not be able to
check them back in
It said that there is a hidden document library called Workflow and it should basically have only three columns:
- Created By
- Modified By
- Checked Out To
My workflow library had an additional column called Title and it was marked as required. According to Microsoft KB article this column or any new column apart from the above three if present should be optional. That was it, that worked like a charm. I made the Title column optional and I could check in my workflow files!
Once the workflow files were checked in my workflow worked fine and there was no error while running the workflow.
So in a nutshell, if you receive the error which I received (given in red coloured font) check if your Workflow library in your site has any required fields. If you have make them optional.
Note: Although the above KB article is for SPD 2007 it works fine with SPD 2010 as well. Navigate to your site in SPD 2010 - All Files - Workflow - Right click & select Properties and select the option to manage permission and your Workflow library settings page opens in browser from where you can copy the List ID. Follow the rest of the steps from the MS KB article.
Comments
-Courtney
Its mentioned here in this MS article on, how to find the Workflow library:
http://support.microsoft.com/kb/2273439
..Manoj
Nick
I ran into the issue you described - 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!
Thanks!
We didn't do any SharePoint update in the last weeks but seems like this ocurred just a few days ago.
My concern is that I may need to go to every site and perform the trick you mentioned above.
Cheers,
Marco