SPD2010 Workflow Packaging Part 3: Custom Task Forms

21 June 2011

Following on from the previous two posts, here's another thing that you might have to do in order to get your workflow working correctly, if you've used any custom task forms or "Collect Data from User" actions. Many thanks to Benjamin Hutting and his blog post that pointed me in the right direction!

What you'll find is that you will have deployed your workflow and everything is fine, until you need to use one of the .xsn files, whether it be the initiation form, or a task form - more than likely, the error you will get will be something around "the form has not been browser enabled".

To fix this, you need to add a couple of properties to your xsn forms:

   <Property Name="ContentTypeId" Value="0x010107004E610F5A29049D419EC0DF99AC577F7C" Type="string" />
    <Property Name="vti_contenttag" Value="{FFBDB99D-81D4-44E0-80ED-F5FD8C7B14D3},9,8" Type="string" />
    <Property Name="ipfs_streamhash" Value="wVkgvw//oxebgHKAKQzsBNDC+YwEiBPCl5897nHvfJo=" Type="string" />
    <Property Name="vti_privatelistexempt" Value="true" Type="string" />

You can grab these properties either from looking at the original .xsn in SharePoint Manager, or by opening up the generated SPD Template .wsp.

Another issue you may run into, which I did, is that although the administrator can open the .xsn files, normal users can't access the .xsn files / browse to them, even though the object model will tell you they have full permissions. Adding the Manage Lists permissions allows them to view these files, but a better option is probably setting the AllowEveryoneViewItems property for the Workflow list to true.

While I feel like the vti_privatelistexempt property is meant to circumvent the need for this, it doesn't seem to work for me - keen to hear if anyone has used this properly before!

EDIT: This...didn't end up working for me, since I had no way to update the .xsns nicely without having InfoPath Forms Services / Infopath - so take the above advice with a grain of salt if you're attempting to move the autogenerated .xsn created by SPD2010...i even tried unpacking the .xsn / cab, renaming the <xsf3:baseUrl relativeUrlBase="http://qsxdevspstuart2/qcs/Workflows/Problem Evaluation/Problem Evaluation.xsn"/> in the .xsf, but no luck...

Tags: permissions, SharePoint 2010, task form, Workflow, xsn

Add a Comment

No Comments