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?

1
  • Can you test if the ItemUpdated event is triggered? Dec 6, 2013 at 8:48

1 Answer 1

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.

1
  • 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, 2013 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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