Thanks, so question:
If I set the workflow as run when 'item is modified', would it take 'discard check-out' as an action?
When I ran it so far, it didn't trigger
How can I capture user trying to discard check-out?
Should be 4th option.
With the action you can:
Select the "Check out" state to monitor for change:
Checked out: When the document is checked out.- Checked in: When the document is checked in.
- Unlocked by document editor: When the document is no longer being edited by an editor.
- Discarded: When the document's checked out status is discarded.
Sorry I don't have 'Wait for Check-out Status change' as it says 'Nintex external platform is required for this feature.' on the link provided.
Any other ideas?
Thanks again!
hehe, sure you don't - they are only in on-premise.
I did it that way for O365, and it worked:
- Create a text variable, but don't set any value to it;
- Then in your filter or wait action do a comparison - checked out to equals <that string variable>
That way you will be able to track down if the document has been checked in or not.
Now if you want to check if the document has really been checked-in, I would suggest the other approach:
- Set the library settings to create minor versions (0.1, 0.2, 1.1, etc...)
- If your case is a situation, when a user uploads a document, but does not fill metadata, but discards the checkout, that would mean the document has the 0.1 version. If checked-in in that case would have the 1.0 version. So... simply wait until the version equals 1.0
Regards,
Tomasz
Thank you for the long reply. I learned a few things from there.
The core issue for me is, how can I capture if a user did a 'discard check-out'?
I tried creating a workflow and set it as 'run when items are modified' and it didn't trigger!
-----
Another issue is, yes I can run a site-workflow using your tips to find out which ones are checked-in without filling in metadata. But then how do I check-it back 'out' for the actual user? (who last modified the file)
You can create a list workflow, that is triggered on item creation. It should capture the version of the item.
Let's assume, this is a new file - the version until user checks it in is "0".
So you should then create a variable, and calculate the version which will unpause the workflow - ex. 1.0 - that would mean, workflow is unpaused when user checks the file in. If he doesn't, the workflow stays paused.
You can create a parallel branch action and in each branch set the workflow to wait for a different value, ex. 0.1 - checked in but not published and 1.0 - checked in and published. All wrap with a state machine. Then of you move on in the 0.1 branch you can into state - "Send info to user to publish the item". If 1.0 - it the state machine and then execute your logic.
For checking in, you should use the: https://help.nintex.com/en-US/o365/o365/O365WorkFlow/WorkflowActions-INT/Office365CheckInItems.htm action, however this will not be ne on alf of a user who checked-out the file in the first place, but the app account.
Regards,
Tomasz