1

We have reusable WF2013 in document library.
What bothers me is that wf starts on item edit, and when user opens document (lets say word doc for an example), after he clicks Save in word WF starts, which is totally clear why, but because of thing that user still keeps opened document, he still didnt close it, workflow gets HTTP 423 message, doc is locked for use.
Now, after he closed document it gets some time until auto lock is removed and workflow starts automatically again and finishes its job.

My question is, is there a way to disable wf starting when user clicks Save button, but just to trigger it on item close? Or is there any other way to overcome this problem? So it doesn't happen to me that I get HTTP 423 message.

Note: What also should be noted is we have custom edit form in which we check if document is opened, if yes, form will tell user that he cant save metadata before closing document, but if in document itself, user is able to click on save button and that is only case when we get HTTP 423.

2

I don't think you can prevent the workflow from starting when save button is clicked. What you can do instead is to make sure the workflow does not proceed untill the document is checked in. In 2010 workflow you would simple use the 'wait for field change' action. In a 2013 workflow you would need to make a loop checking is the document is checked in every few minutes.

|improve this answer|||||
  • Can you please specify little bit more? I am not sure I understood you properly, because I will never have checked out document. Documents are edited in web app mode. On edit form I check if document is in use or not, if it is in use I forbid user to save metadata and send popup message to close document. What I can't do is to forbid him clicking on save in document itself, that is when I get problem. – Danilo Nov 14 '18 at 11:13
  • Additional information I didn't post is that workflow pauses immediately on start when document is opened. So I can't practically check anything in workflow. – Danilo Nov 14 '18 at 11:32
  • You would have to force checkout on the documents for it to work. The pause isnøt really a problem as you would just make the check before the pause action... – Morten K Nov 14 '18 at 12:23
  • This is not an option as I have to enable collaboration in word between users. More than 1 user has to be able to edit document. So forced check out is not an option. – Danilo Nov 14 '18 at 12:43
  • 1
    No problem :) Well the conflict issue is there purely because you are going down the road without enforcing checking in/out - it will be there even if you solve the save/workflow issue :) – Morten K Nov 14 '18 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.