Subscribe to News feed

SharePoint Designer workflows trigger before properties are set

Posted at: 5:13 PM on 29 May 2009 by Muhimbi

Sherlock Another post from our ‘customer support archives’. We’ll call this one ‘The case where custom properties were not copied to the converted PDF file and why it was not our fault’.

We were contacted by a SharePoint developer who is using our PDF Converter to automatically convert a file to PDF format as soon as it is uploaded to SharePoint, a common requirement. However, it appeared that the custom properties specified on the source document were not copied over to the PDF file, even though this feature was specifically enabled.

After a brief investigation the following came to light:

  1. On Document Libraries that do not require an explicit check-in, workflows are triggered as soon as the file is uploaded, before the custom properties are filled out.
     
  2. Filling out the properties directly after the file has been uploaded does not retrigger the work flow.
     

In other words, the workflow and associated PDF conversion process was triggered before the properties were set so it appeared they were not copied over.

This is all very inconvenient, fortunately there are a number of workarounds that you can apply:

  1. Use the ‘Pause for duration’ workflow activity and periodically re-check if the properties have been filled out. Your mileage may vary as this activity is known to be very buggy.
     
  2. Change the settings on the Document Library and require explicit check-ins. With this feature enabled the workflow waits until the check-in has taken place (after setting the properties).
     
  3. Use the 'Wait for field change in current item' activity to pause the workflow until one of the mandatory properties is not empty.
     

Option 3 is probably the most elegant, but it depends on your exact requirements.

For a tutorial on converting files to PDF Format from a SharePoint workflow check out this blog posting.

.






Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link