Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In Production Environment : We have Custom Workflows in a Visual studio Project, each time we create a Site based on Site definition we have to reassign workflow association from visual studio. How to avoid this problem ?

In Live Environment : How can we deploy workflows with our Site Definition (list Definition and content types) ?

Any help will be highly appreciated.

Thanks.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I would go for:

  1. Make the workflow attach himself to a content type. You could easily do this by adding the Content Type to your solution (deploy via a Site Collection scoped feature - recomanded) and irrelevant of whether you have or not a Site Definition, everywhere where the Content Type gets deployed and used (with the workflow code too of course) it will attached automatically. Here example of declarative connecting them http://howtosharepoint.blogspot.ch/2010/05/custom-workflow-not-available-to-be.html
  2. In the Feature Activated receiver you could programatically attach the workflow to either list, site, etc. depending of course of your workflow intended use. Attaching programatically here http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spcontenttype.workflowassociations.aspx or here http://www.thorntontechnical.com/tech/sharepoint/sharepoint-2010-associate-workflow-to-content-type-in-a-feature
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.