We are using SharePoint Foundation 2010.
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?