Monday, September 3, 2012

Workflow Runs on New Document Upload Before Metadata is Set?

That's the expected behavior! When Workflows configured to start on Item creation, They'll start as soon as you upload a new document and will not wait until you enter Meta-data. In fact, Metadata page is a Edit form!

Alright, How to Mitigate? 

  • Change the workflow trigger from "Item Creation" to "Item Change" if possible. If you want to check whether the document is newly created, Just compare the Created & Modified fields. They'll be same when you upload a document for the first time.
  • In beginning of Your workflows, Include the logic to check whether the metadata values are present. If not, Just wait for the metadata to set or end up the workflow. 
  • Alternatively, you can set the default values for your metadata fields, so that they will not be empty.
  • You can set "Require content to be checked out" option, so that workflow will not run until you enter the mandatory fields and check-in.
  • Using a Pause action may work (e.g. pause for 5 min) which I don't recommend however!



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

3 comments :

  1. Thank you so much. This solved my problem flawlessly!

    ReplyDelete
  2. I have a SharePoint 2013 document library with mandatory metadata and a workflow runs upon document upload. However, during document upload when the metadata is entered in the second step, I am getting the following error "The file xxxxx has been modified by yyyyy on date/time" and the metadata is not saved. However, the workflow is running. Any help is much appreciated.

    ReplyDelete
  3. Nilanjan, same problem here. Did you find a resolve for this?

    ReplyDelete

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...