InfoPath Forms for Workflows

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 Office SharePoint Server 2007, you can use Microsoft Office InfoPath 2007 forms with your workflows. Microsoft Office InfoPath 2007 gives you the ability to create symmetrical forms; that is, forms that look and operate exactly the same whether they are displayed in the Microsoft Office SharePoint Server 2007 Web interface or within an Office 2007 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 Microsoft Office SharePoint Server 2007 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 Microsoft Office InfoPath 2007 developer documentation.

Microsoft Office SharePoint Server 2007 uses Office Forms Services, a server-based run-time environment for Microsoft Office InfoPath 2007 forms, to host workflow forms. Office Forms Services consumes the forms you create in the Microsoft Office InfoPath 2007 client application and renders them in an ASP.NET framework which acts as a run-time environment for the form. This environment presents a form editing experience that matches the Microsoft Office InfoPath 2007 client application.

For more information on Office Forms Services, see Introducing Office Forms Services.

For more information on the types of forms that workflows use, see Workflow Forms Overview in the Microsoft Windows SharePoint Services 3.0 SDK.

Displaying InfoPath Workflow Forms

Microsoft Office SharePoint Server 2007 uses the same basic technique to display all custom Microsoft Office InfoPath 2007 workflow forms, including association, initiation, modification, or edit task forms:

When the user clicks a link that displays a workflow form in the Microsoft Office SharePoint Server 2007 interface, Microsoft Office SharePoint Server 2007 loads an .aspx page that contains an Office Forms Services Web Part. This Web Part then loads the appropriate Microsoft Office InfoPath 2007 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 Microsoft Office SharePoint Server 2007.

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 Microsoft Office SharePoint Server 2007. Next, you add an element specifying the URN for the custom Microsoft Office InfoPath 2007 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 Microsoft Office InfoPath 2007 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.

See Also

Concepts

Workflows in Office SharePoint Server 2007
Workflow Association and Initialization Forms (Office SharePoint Server 2007)
Workflow Modification Forms (Office SharePoint Server 2007)
Workflow Task Forms (Office SharePoint Server 2007)

Other Resources

Workflow Definition Schema for InfoPath Forms