Friday, September 30, 2011

Trigger event when workflow is added to a document library

Requirement:  I've created a custom sequential workflow using Visual studio and wanted to create SharePoint group when the workflow is added to a document library.

Issue: There is no event or activity associated to the Workflow which will be triggered when we add a Workflow to a document library of list. Also there is no event associated with document library or list that to be triggered when a workflow is added to it.

Solution: Create an association and initiation form in a workflow using VS.NET 2008. You can use either .aspx or InfoPath forms in a workflow. Association and initiation forms are displayed for users to complete before any workflow actually starts.Association forms are displayed to administrators when they first decide to add or associate a workflow with a particular list, document library, or content type. You can use association forms to let an administrator specify parameters, default values, and other information for the workflow as it applies to items on the list, library, or content type with which the administrator is associating it.

Below are some excellent resource I referred to and implemented successfully. Please refer to

Workflows for WSS3 Demystifying ASPX forms association

No comments:

Post a Comment