Starting Workflows based on SharePoint Events on a Document Set (DocSet)
kbt142082
PRODUCTIssue
1) Starting a workflow based on itemAdded event on a SharePoint document library adding a document Set doesnt start the workflow. (Not the docs inside but the docset itself)
2) Starting a worklflow based on ItemAdded and ItemUpdated for documents in a Document Set starts mutiple workflows.
Symptoms
1) It does not start the workflow or
2) Multiple workflows start.
Resolution
1) K2 does not support workflow start events on folders or DocSets. The Remote Event Receiver has to process the ItemReference to start the K2 Workflow. To do this GetDocumentByID is called to get the details for the item Ref. Folders and docSets have file objects and it will therefore not start the workflow.
2) You cannot use both the ItemAdded and ItemUpdated events to start a workflow where documents are added to a DocSet. This will start a workflow for each event registered. This is caused by the way Sharepoint adds documents to the DocSet. First it uploads triggering the ItemAdded Event and then it updates the Document Metadata which triggers the ItemUpdated Event.