How to I workflow a document check out?


Badge +3

I'm newer to many of the Nintex workflow components.  Could someone help guide me in the correct way to set the workflow to update multiple items (or single items) on a document library with needing to 'check out' the document first?  I am getting the below error when the workflow runs.  I have verified the item is not checked out.  Thank you!

ErrorThe workflow could not check out the list item. Make sure the item is not already checked out.Unknown error

23 replies

Badge +3

Sure.  It is a library and the workflow is a site workflow.  I have the workflow laid out to 1. query the list, 2. check out the item(s) based on a maturity date column compared to current date, 3. updating the item, and 4. check in the item(s) after updating.  I will give the discard check out a try since there is only one item meeting this criteria today.  Thank you!

Badge +3

Here is the error I received when running the discard check out.  Thank you!

11/16/2015 10:50 AMErrorThe workflow could not discard the check out of the list item. Make sure the item is already checked out.The workflow operation failed because the action requires the document to be checked out.
Badge +5

HI Anthony,

Have you tried a "Wait for Document to be Check Out" Action or a Commit pending Changes Action?

That my help. If possible can you post a screen shot of the WF, It just makes it easier to understand.

Badge +3

I was able to get the workflow to work, but I get an error at the end, even though the item change has been made?  Is there a way to validate the item was checked out, updated, and checked back in without getting the error?  The workflow runs, completes the actions set up, but they still spits out a random error.  The 'run if' is filtering based on a maturity date column compared to the current date.  I have a yes/no field that I am trying to update within the items that qualify.  The crazy thing is, the item shows checked out, updated, and checked in.  I also receive the email notification at the end of the workflow.

144099_pastedImage_1.png

144098_pastedImage_0.png

Badge +5

I've seen this before I'm tying to jog my memory.  In the Check In Action What are you choosing? if my memory serves me correct I think there is a drop down which says Overwrite etc.

Do you need to Check in the Changes? I do remember when I was doing a similar excise that I choose not to Check in the Item especially since it was giving all kinds of errors.  In my case I didn't need to check them in so I used a discard action instead?

Badge +3

I have the check in from set to the correct list name, the where set up to the doc ID from the collection variable and equal to Doc ID.  There is a check in type, which I have as Major Version, but there is also options for Minor version or No Version Change.  Thank you!

Badge +5

Exactly I think If you change it to No Version Change It may work.  But I'm not sure if that satisfies your requirement

Badge +3

I do need to have the check in with the major version.  I am baffled on how the workflow will run and complete, but then throw an error message.  A very generic error message at that.

144219_pastedImage_1.png

144218_pastedImage_0.png

Badge +5

I totally Understand! I went through this. Just for Kicks can you see if you do no major version change does the workflow work? This way we can confirm that it's the Check in Action that causes the issue?

Also I assume that you have Check in/Check out (Version) turned on your library.

Badge +3

I wondered if you would ask me that!  I did change it to no version, and it did error.  I also changed to minor version and it did error as well.  Right now, I have moved the commit pending changes outside of the for each to see if that did anything.....no luck, got the error and the item did not update.  I will move it back within the for each process.  Is it better to put the commit pending changes after the update item step, or later on after the check in?

Badge +5

Try turning off Verisoning on the list.  And then run the workflow. I should run perfectly. If it does then you can isolate the issue is with Verison.  I also think it's an issue with Microsoft Word, it gets strange when you start messing with the verisoning. 

I like to do my WF one action at the time so that I can figure out where it break. 

Badge +3

It looks like it is narrowed down to the versioning being required.  I have test a PDF document and received the same error to rule out the chance that it was just the Word doc.  I will have to work with the list owners to turn off the versioning at some point to try and rule that as the culprit.  Thank you for all your help on this.

Badge +5

Any time! Can you mark this as helpful please happy.png

Badge +3

Colin,

I will look in to dissecting each step of the workflow.  I have tested this morning with versioning turned off and received the same random error message even though the needed field was updated and the WF completed.  I believe this was a suggestion from Melissa.  Thank you!

Badge +3

I will need to dissect the workflow.  The versioning didn't change the error message.  Thank you!

Badge +5

I kinda had to so the same thing!

I used it in a different way. I have a WF that checks out a document - Grabs the name and creates a Wikipage with the name and then discards the check out. That seems to work but once in a while it will error. my users are kinda used to it.

Hope we helped you out

Badge +3

So do you just advise them to ignore the error message?

Badge +5

@Anthony Davis

No then they usually say "SharePoint Sux" and then terminate the WF and manually start the WF.

Badge +5

Colin Evans

In my case it seems like it's a timer and or user issue.  The WF is in Document Library that has a Template. When users have to create a new Document they go to the template in the library and begin to work on their document.  As Users will do they leave the document open on their Desktops all day or for a few days without saving it. (that in itself is an issue). When they want to save it what they should be doing (I've said this, its in the user guide that I wrote for them and I say it all the time) is saving it, checking the document in as a minor version and closing Word completely. My first WF is set to run on Create. It goes out and checks out the document uses the name of it to create a Wikipage then updates a hyperlink fields with the wikipages url and checks in the Document with no Version Change. If users dont' close out Word I see the WF error even though the Wikepages gets created. I then terminated the WF delete the Wikipage ( if I don't I get another error message) and run the WF manually and it works perfectly. Sigh

My second WF which sends an email out when a New Verison is saved workd PERFECT because I don't change anything I just grab info from it. 

Badge +4

In my case I prefer use web service, it works perfectly for me

20.png

Details of my checkout

21.png

Detais of my checkin

22.png

Badge +11

Hi,

Is it password timeout or password change policy? You can create a farm level credentials for all the web service actions to be used across the farm. You have to change the password in one place only but you will have to remember to change it. Else workflow will fail as you mentioned.

Badge +3

So, after running this on the list automatically I have received no errors.  I have the WF set up as a site workflow, but instead of manually running occasionally, it is set up to run automatically daily.  No errors anymore.  Very strange.  Thank you all for the help on this.

Badge +5

GREAT!!! Glad it all worked out!happy.png

Reply