WSS 3.0 error: Value does not fall within the expected range
© 2008-2010 DocumentManagementWorkflowInfo.com - Read our Copyright Notice
Learn how not setting appropriate values when deploying a workflow can affect seemingly unrelated functionality in WSS 3.0, and how you can avoid getting such errors.
Problem
You create a simple Visual Studio workflow, one that has only an OnWorkflowActivated activity with no other code than code that binds the WorkflowId property. You create the feature.xml and the workflow.xml using standard Windows SharePoint Services Workflow code snippets. You deploy the workflow using the install.bat file.
Now when you try to access the Form Library Settings page of any Form Library on the site where the workflow was activated, you get the error:
Value does not fall within the expected range.
Solution
Check whether you have filled out all of the required values in the feature.xml and workflow.xml files. If you use the Windows SharePoint Services Workflow code snippets, the required values are highlighted in green.
In my case, I had left the TaskListContentTypeId, the AssociationUrl, InstantiationUrl, ModificationUrl, StatusUrl in the workflow.xml file, without setting appropriate values for them, because I was not using them.
Part of my workflow.xml file looked like the following:
TaskListContentTypeId="0x000"
AssociationUrl="_layouts/MyAssocForm.aspx"
InstantiationUrl="_layouts/MyInitForm.aspx"
ModificationUrl="_layouts/MyModForm.aspx"
StatusUrl="_layouts/WrkStat.aspx"
I resolved the error by deleting these attributes. If you do not require certain optional workflow attributes or elements, delete them from the workflow.xml file.
Note: The error listed in this article is a generic and misleading error message, which can have other causes than the one mentioned above.
Related Articles
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of the owner of DocumentManagementWorkflowInfo.com. The techniques demonstrated in this article may be used within any SharePoint project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the owner of DocumentManagementWorkflowInfo.com.
