The community for Microsoft Office SharePoint Server champions!

The problems with workflows included in List Templates

SharePoint’s handling of saving lists with SharePoint Designer created workflows attached as a list template is less than robust. At first look, creating a list instance from such a template appears to have all the workflows included, however actually using the workflows brings to light the following faulty behaviour:

·         The workflow files (.xoml, .rules, start page, etc) are not duplicated for the workflows in the template.

·         When the template is used on a different team site from the source, the start page is not found. The url of the start page is relative, and as noted above the files are not copied to match.

·         Workflows that contain operations on the ‘current list item’ will fail to perform that operation as it is list ID dependent, and that ID is not updated to reflect the new list instance.

·         On list items included with the template, workflow history will not show on the status page. History is entered into the workflow history list when a workflow is run, but the binding to the status page is broken.

·         Auto-started workflows run correctly when new items are added. However, attempting to start a manual workflow on a newly created item results in an error “The data source control failed to execute the insert command”. This only applies for instances of the list on the same site as the source list, where the start workflow page will be found.

When you consider how SharePoint stores workflow history (in the workflow history list), that each workflow can only be associated to a single list and that each workflow on a team site must be uniquely named, it is understandable why most of these problems occur.

Unfortunately, workflows are included in the list template whether the “included content” option is chosen or not, so SharePoint users are forced to work around these issues. In most cases it will be easiest to delete the workflows via the list settings.

A final note: workflows included in a site template behave correctly. List IDs in the no code workflow files are updated appropriately.

Published Sunday, 29 April 2007 10:05 PM by james

Comments

No Comments
Anonymous comments are disabled