Had an issue come up where we wanted to find all the workflows in a SharePoint 2007 environment that were using a certain workflow activity. Each list has a workflow association collection that tells you the workflows that are configured for the list. From the workflow association, we were able to find that each workflow association has a BaseTemplate object that points to the assembly and class name for the workflow. With that information, we were able to use reflection to get the ActivityCollection.
Here’s an example of what that code looks like. This finds both SharePoint Designer and Visual Studio based workflows (also includes the OOB workflows). The output is comma-delimited, showing the following data :
URL of the web, List Title, Workflow Association Name, type of Workflow Activity.
Once you get the output, you can open the comma-delimited file in Excel, and filter out whatever data you want. For example, you could filter out the workflows on a particular web. You could also find any workflow association that uses a CodeActivity.