0

I have a Sharepoint 2010 document library with a folder structure containing documents. I have created a sequential workflow in C# in Visual Studio which is started when a document is added or updated.

I have done this by associating the workflow to the document library and checking the checkboxes "Start this workflow when a new item is created" and "Start this workflow when an item is changed".

What this workflow does is updating document properties based on the physical folder location of the document. For example, if the document is located in folder "ProjectABC" then the document lookup column Project gets a lookup value to the "ProjectABC" project in the Projects list.

Files are created and edited in Word and with every save the workflow is triggered and updates document properties, if necessary. This is working like a charm.

Users also use Windows Explorer to move documents to other folders in the document library. In this case, however, the workflow is not started.

I suspect the reason for this is that moving documents within the same document library is not considered a create or update.

My question is: Is it possible to let the workflow start when moving documents?

  • Can you test if the ItemUpdated event is triggered? – Gert Braspenning Dec 6 '13 at 8:48
0

I believe "move" is a distinct event separate from "add" or "update."

Take a look at the "item file moved"event receiver.

You should be able to just use event receivers (add/update/move) instead of the workflow altogether, if the metadata update is the only action the workflow takes.

  • Thank you for introducing event receivers! I created an event receiver and implemented several events, so now moving documents is also supported. From the event receiver I start the workflow with C# code. I wanted to keep the workflow because I have an AssociationForm which has some important settings. – Bouwe Dec 11 '13 at 8:19

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.