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