Monday, December 1, 2008

WSS 3.0/MOSS 2007 SP1 and Custom Action in SharePoint Designer

We implemented SharePoint Designer based workflows at a client site. One of these workflows copies a document that is created at the "root" level of a document library (which hosts InfoPath-based documents) to a designated folder and then deletes the document from the "root" level. We were using a custom Action titled "Copy List Item Extended" that we got from CodePlex (http://www.codeplex.com/SPDActivities/Wiki/View.aspx?title=Copy%20List%20Item%20Extended%20Activity&referringTitle=Available%20Activities) to perform the Copy operation, and the out-of-the-box provided "Delete Item" Action to delete the document. Once the document is copied, we have another dependent workflow that runs (when a new Item is created in the folder) and generates an e-mail that is sent to an Approver. The e-mail contains a link to the document that now resides inside a folder. These workflows were working fine until we applied WSS 3.0 Service Pack 1 and MOSS 2007 Service Pack 1. After we applied both Service Packs, we found that the document was being successfully copied by the "Copy List Item Extended" Action to the folder, but the dependent workflow (the one that generates the e-mail) was not running.

After a lot of troubleshooting, we contacted Microsoft Support and we discovered that the "Copy List Item Extended" Action was NOT being recognized by SharePoint as an Event after the SPs were applied. And therefore the dependent workflow was not being triggered.

To resolve this issue, we are now using the out-of-the-box provided "Update List Item" Action to move the document from the "root" level to the designated folder in the document library. With this we don't have to explicitly call the "Delete Item" Action to delete the document from the "root" level. The "Update List Item" Action simply moves the document to the new location (i.e. the designated folder). And this is recognized as an Event by SharePoint and therefore the dependent workflow is triggered and the e-mail is generated successfully.

I am hoping this information will help others out there who might encounter this issue.

No comments: