I am trying to figure out how to use a custom Infopath form with a Sharepoint 2010 workflow. I have read about a million tutorials on how to do this, but I always end up receiving a "The workflow template has specified no FormURN for this page." error.
I use a Visual Studio project to deploy the solution. I have a Module containing the .XSN form in a "Forms" folder and of course the Workflow itself.
After tons of googling I think these settings should be correct:
My Form Module def:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="OPF" Url="FormServerTemplates" RootWebOnly="TRUE" xmlns="http://schemas.microsoft.com/sharepoint/">
<File Path="Travel.xsn" Url="Travel.xsn" Type="GhostableInLibrary" />
</Module>
</Elements>
My Workflow def:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
Name="Godkjenning av timelister"
Description="My SharePoint Workflow"
Id="d92ce465-4fbd-46ee-9e44-ff0320d2bb75"
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
CodeBesideClass="OPFWorkflowTest2.Godkjenning_av_timelister.Godkjenning_av_timelister"
InstantiationUrl="_layouts/IniWrkflIP.aspx"
CodeBesideAssembly="$assemblyname$">
<Categories/>
<MetaData>
<AssociationCategories>List</AssociationCategories>
<MetaData>
<Instantiation_FormURN>urn:schemas-microsoft-com:office:infopath:Travel:-myXSD-2005-10-21T21-12-27</Instantiation_FormURN>
</MetaData>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>
My Feature def:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver">
<Properties>
<Property Key="GloballyAvailable" Value="true" />
<Property Key="RegisterForms" Value="Forms\*.xsn" />
</Properties>
</Feature>
I have published the form from Infopath as an "Administrator approved form template". After I deploy the Visual Studio Solution the form is displayed in the "Central Administration -> Manage Form Templates" list and is marked as "Workflow Enabled=Yes". I get the No FormURN error no matter how I use the form in the workflow. For instance if I try to use it with a task.
Additional things I have tried:
- Used both Infopath 2007 and 2010
- Security on Infopath form is "Domain"
- The alternate access path is left empty when publishing the form
- Used two completely separate environments
- Endless combinations of different settings in the XML files
It seems like some people have managed to get this to work, but no matter what I do it doesn't work for me.
Here is a link that discuss this problem with various solutions (that doesnt work for me):
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010programming/thread/fac26787-1729-46c8-9021-80652b3734c8
Can only list 1 link on Stack Overflow... first post. Typical...
So if there is any Sharepoint experts out there, please help me resolve this problem! This is the kind of thing that makes me question the whole product!