SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have created a workflow that checks the status of a task list.

If we associate the workflow with the list in the SharePoint UI it works fine.

We were wondering how we could automatically associate it, maybe in the feature receiver code that sets ut the site?


The link that James posted works with the exception of:


has been deprecated, but:



share|improve this question
up vote 2 down vote accepted

This link should provide enough information:

share|improve this answer
@James, thanks for the answer, but this is for 2007, I tried to do it like this but some of the methods have been deprecated. – Shiraz Bhaiji Aug 12 '10 at 7:44

Your Answer


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.