Tuesday, December 15, 2009

Issues and solutions in SharePoint workflows


1) Problem:

The workflow template has specified no FormURN for this page or Falied on Start (Retrying)

Solution:
It actually happens when developers use WSPBuidler to develop workflows. WSPBuidler assumes that Association , InstantiationUrl,and Modification forms are pre-defined. At times, we dont need any forms. Therefore, if don't use any form we get remove in elements.xml or workflow.xml as follows:

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>

<Workflow
Name=”StateWorkflowFeature”
Description=”Description for StateWorkflowFeature”
Id=”2b4d26ea-3ca0-494a-9bfc-d692e5774593″”
CodeBesideClass=”WorkflowTest.WorkflowFeature”
CodeBesideAssembly=”WorkFlowTeste, Version=1.0.0.0, Culture=neutral, PublicKeyToken=da0cdeee5575f79e”
TaskListContentTypeId=”0×01080100C9C9515DE4E24001905074F980F93160″”
AssociationUrl=”_layouts/CstWrkflIP.aspx”
InstantiationUrl=”_layouts/IniWrkflIP.aspx”
ModificationUrl=”_layouts/ModWrkflIP.aspx”
StatusUrl=”_layouts/WrkStat.aspx”>

and REPLACE WITH:

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>

<Workflow
Name=”StateWorkflowFeature”
Description=”Description for StateWorkflowFeature”
Id=”2b4d26ea-3ca0-494a-9bfc-d692e5774593″”
CodeBesideClass=”WorkflowTest.WorkflowFeature”
CodeBesideAssembly=”WorkFlowTeste, Version=1.0.0.0, Culture=neutral, PublicKeyToken=da0cdeee5575f79e”>

2) Problem:
Could not find a part of the path C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CustomWorkflowFeature\Forms

Solution:
It also happens when developer doesn't uses any form. In this case, we have to make sure the following tag is set as such: "<Property Key="RegisterForms" Value="*.xsn" />", the value of RegisterForms key indicates the path to the forms relative to feature file location, if you don't have forms, we should use *.xsn.

Just add this tag "<Property Key="RegisterForms" Value="*.xsn" />"to the Feature.xml file.

REPLACE:

<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="94276D94-FF30-4da8-801F-C286FF98BA55"
Title="Roll of Dice WF"
Description="This feature is a workflow that rolls dice for you"
Version="12.0.0.0"
Scope="Site"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
xmlns=http://schemas.microsoft.com/sharepoint/>
<ElementManifests>
<ElementManifest Location="ListTemplates\workflow.xml" />
</ElementManifests>
<Properties>
<Property Key="GloballyAvailable" Value="true" />
</Properties></Feature>

WITH:


<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="94276D94-FF30-4da8-801F-C286FF98BA55"
Title="Roll of Dice WF"
Description="This feature is a workflow that rolls dice for you"
Version="12.0.0.0"
Scope="Site"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
xmlns=http://schemas.microsoft.com/sharepoint/>
<ElementManifests>
<ElementManifest Location="ListTemplates\workflow.xml" />
</ElementManifests>
<Properties>
<Property Key="GloballyAvailable" Value="true" />
<Property Key="RegisterForms" Value="*.xsn" />
</Properties></Feature>

3) Problem:

The file Shared Documents/Test.doc has been modified by SHAREPOINT\system on 5 July 2009 16:51:42

Solution:
It happens when we upload a documents with workflow in WSS 3.0. It also happens when update any artifact (webpart/workflow/feature etc)through object model. If we execute List item like item.Update(), we will get an error. Its because While update ListItem the file and ListItem object getting disconnected.

Therefore, item.File.Update() will solve your issue.
More info on http://www.mstechblogs.com/sharepoint/

No comments:

How to display Sharegate administrative dynamic reports via Power BI on SharePoint Online

After working in the SharePoint domain for a couple of years as SharePoint consultant , I am fortunate enough to help customers from man...