Workflow Forms Overview
Published: May 2010
Adding forms to workflows enable you to make your workflows more dynamic and flexible. Forms enable you to gather information from users at predefined times in the workflow's life, as well as let users interact with the tasks for that workflow.
Microsoft SharePoint Foundation 2010 workflows are forms agnostic. You can use any forms technology you choose, as long as your forms are capable of:
Invoking the SharePoint Foundation 2010 object model.
Generating the data necessary to send to the SharePoint Foundation object model.
Receiving and parsing the required data from the SharePoint Foundation object model.
Any information passed to the form on load is formatted as a string, as is the data the form must pass back to the SharePoint Foundation object model when the user submits the form. Although this string is typically XML, you can use any data format that can be formatted as a string, as long as your form is able to generate strings in that format, as well as parse strings it receives.
For example, you can use custom ASPX pages as your custom forms, and XML as the data format in which to format your data.
You specify the custom forms you want to use in the workflow template definition rather than in the workflow itself.
Workflow forms are late-bound to the workflow assembly, through information you supply in the workflow template definition XML file. The workflow template definition schema contains elements for denoting the URL of the various types of forms you can use with Windows SharePoint Services workflows. This includes the ability to create elements for forms for any custom workflow modifications, as well as forms for the various types of SharePoint tasks used in the workflow.
In most cases, the workflow assembly itself contains no information about or link to the workflow forms themselves. Developers can change the workflow forms to be used just by editing the workflow definition XML, without having to recompile the workflow assembly itself. The one exception to this is workflow modifications; each activity that enables a workflow modification must contain the GUID of the form for that workflow modification.
Three types of forms are used in SharePoint Foundation workflows:
Association and Initialization Forms Association and initialization forms are displayed for users to fill out before any workflow is actually started. You can use these forms to enable users to set parameters and other information for the workflow before it starts.
For more information, see Workflow Association and Initiation Forms (Sharepoint Foundation).
Modification Forms Modifications are options you present to users to change the workflow as it's running on an item. You can then create modification forms that enable users to specify the parameters of the modification.
For more information, see Workflow Modification Forms (SharePoint Foundation).
Task Forms You can also specify custom forms for the tasks in your workflow. Because tasks are SharePoint items that are assigned a content type, however, the content type actually determines the custom forms used with the task type.
For more information, see Workflow Task Forms (SharePoint Foundation).