BizTalk BAM: SSIS Packages
When deploying BAM in BizTalk, the bm.exe program sets up various database bits to keep the magic working. One of these parts is a SSIS (or DTS for you oldies) package for each 'Activity'. The purpose of these Packages is to generally jiggle the data around in the BAMPrimaryImport database, which is split up into "partitions". They are fairly complex and yet another database object that is required to keep things running smoothly in the world of BizTalk.
You can view these packages by connecting SQL Management Studio to your Integration Services instance, they'll be named BAM_BM_[activity]. Well... you should be able to view them there. On my server, there are a whole bunch missing. It is important to ensure that these are there, and as far as I can tell, there is no way of repairing this. The only way to force them to be created is to remove and re-deploy the activity, which means, yup, you lose all your data in that activity.
1. Remove any referencing views
Removing views take a long time, but are harmless as they're are quite literally the view to your data, not your data itself:
bm remove-view -Name:MyView
2. Remove the corrupt Activity
This will permanently DELETE your data - gone, caput. I haven't thought of a clever way of managing this, apart from check everything deploys right the first time.
bm remove-activity -Name:MyCorruptActivity
3. Redeploy your BAM definition file
bm update-all -DefinitionFile:BamExport.xml