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

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?

Edit

The link that James posted works with the exception of:

parentList.AddWorkflowAssociation

has been deprecated, but:

parentList.WorkflowAssociation.Add 

works

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

This link should provide enough information:

http://blogit.create.pt/blogs/marcosilva/archive/2007/12/10/SharePoint-Associating-a-Workflow-to-a-list.aspx

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
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.