Maybe because I’m a newbie, but I ran into a lot of problem trying to deploy a workflow template with an InfoPath task form. The trick is in your feature receiver and your feature properties (in the XML definition). The best tip I can give on this is to copy the out-of-the-box ExpirationWorkflow feature, including:
- Use the same feature receiver (i.e. the Microsoft one)
- Include the same feature Property (i.e. RegisterForms and GloballyAvailable)
- Mirror the same file/folder structure for your task form
It was relatively painless once I started copying this out-of-the-box feature.