R – SharePoint and workflows

mosssharepointworkflow

With MOSS 2007 (the question is probably applicable to WSS as well but I'm working in MOSS at the moment) is it possible to have the same Workflow on every Pages list within the site collection?

We're deploying a site with a basic 2-stage approver workflow so I'm not developing a custom one, just using the existing Approver workflow but having 2 approval groups working sequientially (see this blog post: http://www.sharepointblogs.com/tommysegoro/archive/2008/08/18/configuring-sharepoint-moss-2007-multi-stage-approval-workflows.aspx).

The problem is that when you create a Publishing Site it gets (by default) a single approver workflow, not the one I want.

Can I have the workflow enforced across the site collection and for any child site collections? Or do I need to create my own site template (and can that even define the workflow as it's deployed?)?

Edit

Just to clarify, I'm wanting to have the ability to create a new MOSS publishing site which has some slight modifications to the standard Approver workflow which is out of the box within SharePoint. I'm not wanting to deploy a different workflow, just modify the existing.

When you create a Publishing Site you get a "Parallel Approver" workflow which assigns workflow tasks to a group called Approvers and is set to run the workflow tasks in parallel. I need to change the groups (add a new one) and set it to be sequential.

Best Answer

You can create a feature which will add the second work flow to the Pages library when activated using the SPFeatureReceiver class, and staple that feature to the existing Publishing Site site definition using feature stapling.

Here are MSDN posts on using feature event receivers and feature stapling:
http://msdn.microsoft.com/en-us/library/bb862634.aspx
http://msdn.microsoft.com/en-us/library/bb861862.aspx

Related Topic