This project is read-only.

Issue with OTB Sharepoint Workflows

Jun 29, 2009 at 6:11 PM

Reproducable Error, and event interference with Workflows

I have configured SLAM to attach to a doc library...well the SPList associated with the Doc Library I guess.

Issue #1 ( Associate with a doc library and updates only on update not new):
- Add a doc to the doc libary and SLAM DB will not get the update
- Change a property on the newly uploaded doc and SLAM DB WILL get the update. Odd.

Issue #2 (Interference with OTB Workflows on Automatic):

1. Create a doc library
2. In Sharepoint Designer, create an OTB Workflow. My test was to update the Title with the Name field.
3. Allow the workflow to kickoff for New Document creation
4. Register the doc library with SLAM
5. Updload a document to the library

The following happens:
1. The workflow displays "Failed to Start (retrying)."
2. On the next automated SP attempt at the workflow it WILL succeed
3. The record is not passed to the SLAM database

To confirm this is a conflict with automation and SLAM:
1. Change the OTB Workflow in Sharepoint designer to "Manual" and remove option to start based upon new document
2. Upload your document
3. SLAM table will not get the update ( I assume this is a Sharepoint thing..as only the Doc Library has been updated...the SPList has not yet had a modification ?)
4. Manually start the workflow
5. Workflow succeeds
6. SLAM db gets the update
7. Subsequent edits to the Doc library item will be updated by SLAM

Developer
Jul 6, 2009 at 5:44 PM

To address Issue #1:

SLAM interacts with a document's List Item, so in fact when SLAM's event receiver is fired against a document library, or any list as the process is the same for all, the first thing it checks is whether it has a List Item.  When a document is added a document library it actually does not yet have a List Item, by which I mean in an ItemAdded event SPItemEventProperties.ListItem will be null.  I believe that after a document is added and it has no required properties other than its Title SharePoint will Update it after creating it.  If you were tracking the events you would see ItemAdded then ItemUpdated execute after you upload a new document to your library.  If you have other required fields, you would be taken to the edit form of the item after upload, when the file itself is in the library already but its properties are not yet set.  In the end, a SLAM database table receives document library items via its Update process only, though I would expect it to fire upon adding a new document to a library.

 

To address Issue #2:

Add it as an issue in the issue tracker.  We have not yet been able to reproduce and troubleshoot the issue.

 

Thanks,

-Brian