Guidelines and best practices for deploying InfoPath 2007 forms
The information in this article applies to:
- AgilePoint Suite v4.0 or later
- Microsoft Office InfoPath 2007
- Microsoft Office Forms Server 2007
- Microsoft Office SharePoint Server 2007
| TOPIC(S) |
| |
Microsoft Office InfoPath 2007 Microsoft Office InfoPath 2007, which is part of the 2007 Microsoft Office system, allows business to both design and fill out electronic forms. InfoPath is based on Extensible Markup Language (XML).
Microsoft Office InfoPath 2007 is becoming increasingly popular for use with AgilePoint BPMS, because it allows the business analyst and/or IT to develop attractive forms for BPM solutions in a fraction of the time required to create traditional coded forms. Conditional rules and data validation can be added to the forms without writing code.
Standard InfoPath forms are executed on the desktop. As a result, it is recommended that InfoPath be used with AgilePoint BPMS solutions under the following conditions:
-
InfoPath is licensed and installed on all of the desktops that will participate in the BPM project or need to view the form.
-
There is sufficient network bandwidth to download the InfoPath form template from the SharePoint document library each time the form is displayed.
-
The form rules and data validation can be created without writing code.
-
Secondary data sources are not required. Direct connections to data sources from the InfoPath form on the client desktop add complexity, performance delays and additional security configuration.
-
The data being collected in the form does not require encryption. Encrypted XML cannot be evaluated in the process instance at runtime.
-
Active forms in the Microsoft SharePoint 2007 document library can be limited to 2000 items at a time.
Microsoft Office Forms Server 2007
Microsoft Office Forms Server 2007 is a server product built on Microsoft Windows SharePoint Services 3.0 as an ASP.NET Version 2.0 application. It enables users to fill out Microsoft Office InfoPath 2007 forms by using a Web browser instead of, or in addition to, the Office InfoPath 2007 client program. Like standard InfoPath forms, InfoPath forms published to the Microsoft Office Forms Server are based on Extensible Markup Language (XML).
There is a lot of interest in Microsoft Office Forms Server 2007 as a user interface for AgilePoint BPMS because like standard InfoPath forms, it allows the business analyst and/or IT to develop attractive forms for BPM solutions in a fraction of the time required to create traditional coded forms. The primary advantage it offers over the full InfoPath client software is that Microsoft Office Forms Server 2007 renders the form in a browser window and does not require that the Microsoft Office InfoPath 2007 to be installed on the desktop. The second advantage is that it executes the form on the server and downloads a smaller HTML based form similar to an ASP.NET form. As a result of not having the Microsoft Office InfoPath 2007 client, it is recommended that Microsoft Office Forms Server 2007 be used with AgilePoint BPMS solutions under the following conditions:
-
Microsoft Office Forms Server 2007 licensing has been obtained or budgeted for the Microsoft SharePoint 2007 front end web servers. (It is not included in the Windows SharePoint Services 3.0 install.)
-
The form design is basic and can be created with a limited set of data controls.
-
The form does not require Jscript for conditional presentation or data validation.
-
The development team can support the use of managed code to create and maintain custom form functionality.
-
JavaScript and cookies can be enabled on the client browser.
-
Active forms in the Microsoft SharePoint 2007 document library can be limited to 2000 items at a time. |
| |
| SUMMARY |
| |
This article specifically focuses on providing instructions for designing and deploying your InfoPath 2007 forms based on how you would like to display the InfoPath form to your end users.
The following details are some recommendations from Microsoft.
Before you create an InfoPath form template, you need to decide how you want to show the InfoPath form to your end users. You have two options:
- Show InfoPath form to user in a Web browser (via Microsoft Office Forms Server 2007); or
Show InfoPath form to user in InfoPath client (via InfoPath client software) |
| |
|
DETAILS |
|
Part A: Showing the InfoPath form in a Web browser
This part provides information about showing the InfoPath form to the user in a Web browser.
IMPORTANT: By default, Forms Server doesn't support InfoPath form templates that include JScript (i.e. Forms that include JScript will not be able to be rendered in a Web browser).
If you plan to show your InfoPath form using Forms Server in a Web browser, you have two options available when developing your InfoPath form:
-
Clean (No Managed Code and No JScript) using InfoPath Client Software This option is best if the basic InfoPath form development functionality included within the browser-based InfoPath form can meet your requirements. This is a good approach for fast and easy development and deployment. This approach also maintains the business user friendly InfoPath development and deployment strategy.
If you associate an InfoPath form that does not have a managed code DLL to a process model in AgilePoint Envision, AgilePoint Envision will add JScript to the InfoPath form, making it unable to be rendered in a Web browser. Therefore, it is not supported at this time to publish this type of InfoPath form to SharePoint via AgilePoint Envision. It is necessary to publish the InfoPath form through the InfoPath client and make sure you remove the JScript before publishing. For more information, see Deploying the InfoPath Form to SharePoint section below.
-
Using Managed Code in the XSN using Microsoft Visual Studio 2005 If you want to incorporate some custom or advanced logic in your InfoPath form, then it is recommended to use the managed code approach to implement your logic. Design your form template in Visual Studio.NET 2005 using Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO 2005 Second Edition).
It is recommended that you design your form template in Visual Studio.NET 2005 using Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO 2005 Second Edition), even if you don’t plan to use managed code at the beginning. By default, Forms Server doesn’t support InfoPath form templates with JScript. If you want to incorporate some custom logic in your InfoPath form and you want to show your form in a browser, then it is recommended to use the managed code approach to implement your logic.
Download Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO 2005 Second Edition) using the link below:
http://www.microsoft.com/downloads/details.aspx?familyid=5e86cab3-6fd6-4955-b979-e1676db6b3cb&displaylang=en
The link below provides a lot of useful information about Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO 2005 Second Edition)
http://msdn2.microsoft.com/en-us/office/aa905543.aspx
The following screen captures show how to initiate the managed code project in Visual Studio 2005.


After designing and compiling in Visual Studio.NET 2005, you can prepare the XSN file (InfoPath form template that contains your graphical design, the managed code DLL, and other related files) by using the Publish Form Template feature via the “Design Tasks” task pane.

Settings to be done for displaying InfoPath 2007 in a Web Browser
The settings described here apply to both the clean and managed code approaches of InfoPath development and deployment.
NOTE: You can configure the settings described below using either the InfoPath client as described below, or with the Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO 2005 Second Edition).
-
Launch the InfoPath form template in design mode and click Tools > Form Options. The Form Options window appears.
-
In the “Category” field, click Compatibility, and in the “Browser compatibility” field, select the check box for Design a form template that can be opened in a browser or InfoPath.
-
Click OK.

-
Use the “Design Checker” option to check if your form is browser compatible. Click Tools > Design Checker. Make sure all InfoPath views are browser compatible.

-
When publishing the InfoPath form, make sure the check box for Enable this form to be filled out by using a browser is selected. 
-
In SharePoint, to force the InfoPath form to be displayed in Web browser, at the Advanced Settings of your form library, under the “Browser-enabled Documents” section, select Display as a Web page and click OK to save the setting.

Document Name in AgilePoint Task List Web Part
NOTE: The settings described here apply to both the clean and managed code approaches of InfoPath development and deployment.
This part explains how to enable the InfoPath form to be displayed in a browser window when the document name is clicked in the AgilePoint Task List Web Part. The form library is configured to display the InfoPath form as a Web page as shown above. In the form library, when user clicks the New button on the tool bar, the InfoPath form is displayed in browser correctly. The user is able to submit the form and a process is triggered. But when the assigned user goes to the Task List Web Part, and clicks on the document name, the standard SharePoint error page appears.

During the deployment and set up of the AgilePoint SharePoint Integration, add the <assembly> entries in the web.config file under the LAYOUTS folder. This section is included in the Release Notes for AgilePoint version 4.0.
If you want to use the Microsoft Office Forms Server integration for InfoPath forms, there are some manual steps required. In order for the FormServer.aspx.cs file to be compiled at runtime, it needs some extra settings added to the web.config file located within the SharePoint LAYOUT folder. Those settings are not in the web.config by default.
NOTE: It is good practice to make a backup copy of the web.config file before making any changes.
On the machine where SharePoint is installed, modify the web.config file located here:
Local_drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\web.config
Copy the assemblies section within the compilation tag from the source below:
http://www.ascentn.com/Download/SharePoint_Webconfig.txt
Designing the InfoPath Form
When opening the InfoPath form from the Task List Web Part, the Submit and Close button appears on the top toolbar in a browser window. If the InfoPath form is open within a form library, the Submit and Close button will not appear. We recommend you to use the InfoPath default Submit button for submitting a new form.
The Submit and Close button is built on top of the default InfoPath Submit button. Hence, in your XSN, a Submit Option must be configured and the Submit button must be visible on the InfoPath top toolbar.
For submitting a new form, auto naming support is not provided by AgilePoint, because the auto naming capability provided by InfoPath is rich enough.
How to Configure the Submit Option and Form Auto-Naming
You can configure the auto naming when creating a data connection for a Submit Option. At the same wizard window that asks you for the form library URL, click the fx button beside the “File Name” text box to configure the auto naming.
-
Launch the InfoPath form template (.xsn) in design mode and click Tools > Submit Options. The Submit Options window appears.

-
Make sure the check box for Allow users to submit this form is checked.
-
Select the option button for Send form data to a single destination.
-
Select SharePoint document library from the drop-down list. Then click Add. The Data Connection Wizard window appears.

-
In the "Document library" text box, enter the form library URL.
IMPORTANT: You need to provide the form library URL here. If you only provide SharePoint site URL, InfoPath doesn’t know where to submit the form.
-
Click the fx button. The Insert Formula window appears.

-
Click the Insert Function button. The Insert Function window appears.

-
From the “Categories” field, select Date and Time, and from the “Functions” field, select now.
-
Click OK.
-
The function now() is inserted in the "Formula" text box. Click OK to save the setting.
-
In the “Data Connection Wizard” window, click the Next.
-
Enter a name for this data connection for submit, then click Finish to save the setting.

-
From the Submit Options window, at the “Choose a data connection for submit” drop-down list, select the data connection that you have just created.
-
Click OK.

-
The setting for the Submit Option is complete. In order to show the Submit button when the InfoPath form is displayed in a browser, click Tools > Form Options. In the “Category” field, select Browser and make sure the check box for “Submit” is selected.
NOTE: If you do not see the Browser category, this means your form is not browser compatible. To make it browser compatible, click the Compatibility category and under “Browser compatibility”, select the check box for “Design a form template that can be opened in a browser or InfoPath”.


-
Click OK to save the setting.
-
Save the InfoPath form template. Then publish it to the form library in SharePoint. The URL of the form library should be the same URL you entered when configuring the data connection for Submit as above.
The figure below shows the InfoPath form can be submitted successfully if the submit options are configured correctly.
The figure below shows the simple auto-naming has been applied to the form name (xml file name) once the form is submitted.

Deploying the InfoPath Form to SharePoint
The following table provides information about deploying InfoPath forms to be served to the end-user in SharePoint via a Web browser.
| InfoPath 2007 Form Template (XSN) |
Details |
|
Clean (i.e. XSN is designed in the InfoPath client, no managed code DLL in XSN, no Jscript in XSN, and Visual Studio.NET 2005 is not involved) |
Can show form in a Web browser.
Deployment of XSN from within Envision to SharePoint is not supported, must use InfoPath client software to publish.
Quick Tip: If you accidentally asociate your XSN to a process template and AgilePoint Envision has added JScript into your XSN, which makes your XSN unable to be rendered in a Web brower, you can use the Remove Code feature in InfoPath client to remove the JScript via (Tools > Form Options > Programming > Programming Lauguage > click the Remove Code button). |
| JScript in XSN |
Microsoft does not support showing the XSN in a Web browser. |
|
Managed code DLL in XSN (i.e. Using Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO 2005 Second Edition)) |
Deployment of XSN from within Envision to SharePoint is supported.
The XSN is first added to the SharePoint Central Admin, then it is activated to the SharePoint site as a content type, and finally a form lib is created based on the content type.
Envision will not add JScript to the XSN if the XSN contains a DLL, so that it can be displayed in a Web browser. |
Part B: Showing the InfoPath form in the InfoPath client
If you plan to show your InfoPath form using the InfoPath client, you can design your InfoPath form template in the InfoPath client. You can use JScript to implement your logic.
IMPORTANT: When creating a form template using the InfoPath client, make sure you do not check the option “Enable browser-compatible features only” (see screen capture below), if you want to use JScript. If this option is checked, InfoPath forces you to use managed code.

To select Jscript as the code language, go to Tools > Form Options > and select JScript as shown below.

The following screen captures show how to perform the scripting within the InfoPath client.


Designing the InfoPath Form
The Submit and Close button appears on the InfoPath client toolbar. The action behind the button is accomplished by an AgilePoint ActiveX control. AgilePoint JScript functions in the XSN are required to support the ActiveX control.
When associating the XSN to a process template in AgilePoint Envision, AgilePoint Envision adds the AgilePoint JScript functions into the XSN automatically if:
-
JScript or VBScript is selected for “Form template code language” via (Tools > Form Options > Programming).
-
No form template code language is selected explicitly. InfoPath will still display “Visual Basic” as the default value even if you never change the value for the drop-down list of “Form template code language”.
-
No DLL exists in the XSN.
For submitting a new form, auto naming is supported. Two options are available to support auto naming:
-
Web Service: A sequence number is included in the file name. The file name format can be configured in AgilePoint Envision.
-
WebDAV: File name format can’t be configured in AgilePoint Envision. Current date and time is provided as the default naming format. You can write JScript to change the naming format.
Deploying the InfoPath Form to SharePoint
The following table provides information about deploying InfoPath forms to be served to the end-user in SharePoint via the InfoPath client software.
| InfoPath 2007 Form Template (XSN) |
Details |
|
Clean (i.e. XSN is designed in the InfoPath client, no managed code DLL in XSN, no Jscript in XSN, and Visual Studio.NET 2005 is not involved) |
Deployment of XSN with JScript from within AgilePoint Envision to SharePoint is supported.
If you do not need to implement additional logic using JScript, AgilePoint Envision will still add AgilePoint JScript functions into your XSN for integration purposes. |
| JScript in XSN |
Deployment of XSN with JScript from within AgilePoint Envision to SharePoint is supported.
A copy of the XSN is inserted into the “Forms” folder under the form library as the document template.
Quick Tip: In the InfoPath client, design the form template and write any JScript for the form logic as needed. Then in AgilePoint Envision, associate the XSN when creating an InfoPath form library based process model. Design the process flow. Upload the process model to AgilePoint Server, then publish the InfoPath form template to SharePoint. A form library will be created.
Quick Tip: In the Advanced Settings of the SharePoint form library, select Open in the client application in the “Browser-enabled Documents” field.
|
|
Managed code DLL in XSN (i.e. Using Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO 2005 Second Edition)) |
Not supported.
| |
| |
|
Attachments
Add Your Comments
|
Last Modified:Thursday, March 06, 2008
Last Modified By: Brian A
Type: INFO
Article not rated yet.
Article has been viewed 4,498 times.
|