InfoPath Forms for Workflows (ECM)
Applies to: SharePoint Server 2010
Adding forms to workflows enables you to make your workflows more dynamic and flexible. Forms enable you to gather information from the users at predefined times in the life of the workflow, as well as let users interact with the tasks for that workflow.
In Microsoft SharePoint Server 2010, you can use Microsoft InfoPath 2010 forms with your workflows. InfoPath 2010 gives you the ability to create symmetrical forms; that is, forms that look and operate exactly the same whether they are displayed in the SharePoint Server 2010 Web interface or within a Microsoft Office 2010 client application, such as Word, InfoPath, Excel or PowerPoint. This provides a richer interaction experience in which the user can interact with the workflow directly in the client application, rather than leaving the client and switching to the SharePoint Server 2010 Web interface. And as a developer, you don't have to create two separate forms, one for use on the server and one for use in the client, to provide the user with this client application integration.
For more information on creating symmetrical forms in general, see the InfoPath 2010 developer documentation.
Displaying InfoPath Workflow Forms
SharePoint Server 2010 uses the same basic technique to display all custom InfoPath 2010 workflow forms, including association, initiation, modification, or edit task forms:
When the user clicks a link that displays a workflow form in the SharePoint Server 2010 interface, SharePoint Server 2010 loads an .aspx page that contains an Office Forms Services Web Part. This Web Part then loads the appropriate InfoPath 2010 form. When the user submits that form, the Web Part receives the data from the form and handles it accordingly.
The .aspx pages that contain the Office Forms Services web part are included in SharePoint Server 2010.
You specify the custom forms you want to use in the workflow template definition rather than the workflow itself. In most cases, this involves setting two elements. First, you set the form URL for that workflow process (association, initiation, modification, and so forth) to the appropriate .aspx hosting page included with SharePoint Server 2010. Next, you add an element specifying the URN for the custom InfoPath 2010 form for that type of workflow process.
Submitting Information Using InfoPath Workflow Forms
For the hosting .aspx page to receive data from the hosted form, the developer adds a Submit button to the InfoPath 2010 form. This button uses a rule to submit data by using the data connection to the hosting environment. This connection passes the data back to the hosting .aspx page automatically when the user clicks the Submit button. The hosting .aspx page then handles parsing the data and passing it back to the workflow or document library, as appropriate.