Error:”The form has been closed” – InfoPath 2007
Here I got an error when I tried to attach custom InfoPath Initiation and Association forms to display in a SharePoint workflow. Depends on the IE session the error message differ. If you close the browser and reopened 2nd and 3rd error messages will appear.
Anyway this error message appear because of the xml statement in the workflow.xml. If you check your workflow.xml you can see the form URNs are written like this
<Association_FormURN>
urn:schemas-microsoft-com:office:infopath:Test:-myXSD-2010-07-06T09-15-06
</Association_FormURN>
<Instantiation_FormURN>
urn:schemas-microsoft-com:office:infopath:Test:-myXSD-2010-07-06T09-15-06
</Instantiation_FormURN>
To fix the problem, you have to remove the spaces between the xml tags like this. DO NOT keep any spaces between <> and </> tags.
<Association_FormURN>urn:schemas-microsoft-com:office:infopath:Test:-myXSD-2010-07-06T09-15-06
</Association_FormURN>
<Instantiation_FormURN>urn:schemas-microsoft-com:office:infopath:Test:-myXSD-2010-07-06T09-15-06
</Instantiation_FormURN>
Please add a comment if you use this code or it helped you. So I can make my posts better.