I have a workflow which runs a series of complicated steps (not sure it's necessary for me to sum them up, but please ask if it might help). My workflow runs on "create" and my users copy files from different subsites (which are set up exactly the same using a template). When files are copied, the filename is "Sent_"+the number of milliseconds using JavaScript (so that copies can be unique).

My workflow starts off with "If Name begins with 'Sent_'..update item" and all those fields I'm updating are different "Status" fields being set to Draft. If I publish the workflow, without changing anything, the first new file that uses the workflow succeeds. After that, all other workflows fail until I publish it (again, without changing any steps at all). What could this mean?

Also, it works 100% of the time when files are copied from using an Event Receiver and the SPFileCollection.Add method, but it fails (after the first success) when files are copied using the Copy.asmx web service even if they all contain the same metadata. The only difference I see in the copied files is that the Copy webservice leaves a link saying "This file is a copy of ____" with a link to the original file.

The only time I can make the workflow work on files that have been copied with the web service is when I put in a "Pause for 1 min" action.. I noticed something similar on another project when I tried to rename the file too soon in a workflow which ran on create. So the issue could be that I'm checking the filename too soon. It's nice that I can make it work with this delay, but my work environment is set up so that a 1 minute pause can actually take up to 10 minutes to start. What is a better way to wait until the copied file is "ready" for me to make updates to it aside from a pause? The "Wait for field change" action would be nice to leverage here, but I can't think of any field to wait on.

I know this is a very open question with lots of possible explanations, but I'm willing to look at any possibilities right now.


I put in a "Wait for Modified to be greater than Created" action which I'm guessing essentially tells it to actually wait for all the updates (behind the scenes ones which the copy webservice is making) to be completely finished. I was still rarely, but consistently, having issues where Modified was always going to equal Created until someone manually made an update, so in one of my other workflows which was running on change, I put in an "If Modified is less than or equal to Created, update some random text field" action.

I have about a 90% success rating on larger copies (45/50) and 100% for smaller copies anywhere from 1-15 at a time which will suffice for now. The other 5% are oddities where the workflow is stuck in a "Starting..." position" but a recopy will work for the exact same item.

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.