Pause until item checked in

Apr 20, 2009 at 1:55 PM
Would like an action that enables an SPD workflow to pause until a document is checked in.  Right now, our workflows error out if the workflow tries to update a form field when that form is still left open by a user (message is:  Error updating list item - document checked out).  The workflow is not temporarily stopped awaiting the form to be closed - it just hangs, so even if the form is then closed, the workflow must be terminated manually and restarted instead of continuing on from that point.  Since many users can access the form library and anyone of them can leave their form open after completing a task (which is when the workflow updates the field), we cannot determine when the form will be closed out and thus available to the workflow.

Any ideas for dealing with this scenario would be appreciated...
Apr 20, 2009 at 2:26 PM
Actually, just tested this scenario by putting in this code between collecting data from a user and updating those form fields:
   If Checked Out To is not empty
     Pause for 5 minutes

That should have given me time to close my form in the test.  However, the workflow did not pause, which tells me that even though the workflow sees the item as checked out, it is not captured by the 'Checked Out To' attribute, so now am really at a loss to deal with this situation...

Any ideas?
Apr 20, 2009 at 3:26 PM
Hi,

I usually do the same in terms of 'Conditions' (If Checked Out To is not empty), then my 'Action' is to 'Wait for Checked Out To to be empty'.  This always works fo me.  Not sure why you would want to pause for only 5 minutes though, unless you want to send a reminder email or something to tell them to check it in.

So when I need to update the record/item with the workflow I have an action to check-out the item, update it, then check it back in again.

This has its own issues though in terms of versions being increased, and if the workflow was started by the system the Modified By field has System Account in it.  But this does the job, although we find the 'check out' features causes us more issues than it solves.

Cheers,
Pete.
Apr 20, 2009 at 3:48 PM

Was using Pause just as a test, but your are right - Wait for Checked Out to be empty is better.  Actually, issue will not be resolved with either.  Received this reply from Frank Chiang:

I am not 100% sure of this but when the IP form is opened in 'form' mode (as compared to 'browser' mode) it locks the data. It is not equivalent to 'checking out' the form, so trying to enumerate the 'checked out' value may not be the right approach, that's why wf doesn't stop. You will need to find another indicator instead. In .net world, you will have to check if the record is 'locked'.

So, unless my SPD workflow can tell if the document is 'locked' (have no idea how to do that), I will continue to have this problem.

Thanks,
Shelly