7

Hello,

I have created a SharePoint 2013 list workflow in library L1 which does the following actions:
1- Create a document-set in library L2
2- Copy the current document from L1 to L2
3- Move the copied document in L2 to the document-set using “update” action workflow
When I run the workflow manually it works perfect but when I set the starting option of the workflow to “start workflow automatically when an item is created” it doesn’t work anymore. 
As I want to upload a new document I get the following notification at the bottom of the upload form:


enter image description here

By the way, I created another simple workflow with only a log action, as a test, and it starts without any problem automatically as I create a new document.

How can I fix this problem to run my workflow automatically when an item is created?


4

I had this same issue. I was keeping track of versions and had a workflow running when I uploaded a document to my document set. When ever it was uploaded I received the same error.

The "Automatically update the workflow stat to current stage name" was actually creating a new version.

This caused a problem with the form thinking it was creating v.2 when in reality it was creating v.3 so I received the something went wrong message.

To solve the issue, in SharePoint Designer, in 'Settings', uncheck "Automatically update the workflow stat to current stage name".

2

Try adding a short pause in between steps that modify the file referenced in the error. I think this error message means that the item is locked for editing because it's being changed too many times very close together.

  • Thanks Erin! I have already tried this solution by adding one pause action for the duration of 1 minute, as the first action in my workflow, but the problem is still there! – Lucas Feb 24 '16 at 16:21
  • When a document is uploaded, the item is created and THEN the file is uploaded (unless your are fast). I would advise to pause until modified is /= to created. I get better results with this over a timed pause. – Jammin4CO Feb 24 '16 at 19:57
  • A pause at the beginning won't make a difference because the conflicting actions occur after that. You'd at least need a pause between steps 2 and 3. It's possible you'll also need a pause between 1 and 2. – Erin L Feb 25 '16 at 14:27
1

Few days ago I faced same type of problem and getting same type of error for a Document Library. I tried to update document Name from SharePoint 2013 workflow.

I resolved this issue and started the Workflow when item updated not for created (I checked "Start workflow automatically when an item is changed" and unchecked "Start workflow automatically when an item is created"), and its work.

1

It happens when you add workflow to library so go to SharePoint Designer -> WF -> Settings -> Uncheck "Automatically update the workflow" option :)

0

When you upload a document, first screen uploads the document, second screen (if there are any metadata to be set) lets you populate the meta data. First form essentially initiates a create action, and leave the document checked-out. The second updates the document once more, checks-in and initiates a change action.

What may be happening in your case is, you upload the document, workflow kicks in, and while it is running you try to do the second change.

On some occasions I do the steps you mentioned on the "when the item is changed" action. It is still a good idea to add a pause as suggested by Erin.

  • I came here to say this, but added a solution in the comment on the first answer. I'll still give you the up vote. – Jammin4CO Feb 24 '16 at 19:59
  • Thanks a lot for your explanation Charles. I changed it to run "when the item is created" and it solved my problem. – Lucas Feb 25 '16 at 8:52

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.